High performance, superscalar-based computer system with out-of-order instruction execution

ABSTRACT

A high-performance, superscalar-based computer system with out-of-order instruction execution for enhanced resource utilization and performance throughput. The computer system fetches a plurality of fixed length instructions with a specified, sequential program order (in-order). The computer system includes an instruction execution unit including a register file, a plurality of functional units, and an instruction control unit for examining the instructions and scheduling the instructions for out-of-order execution by the functional units. The register file includes a set of temporary data registers that are utilized by the instruction execution control unit to receive data results generated by the functional units. The data results of each executed instruction are stored in the temporary data registers until all prior instructions have been executed, thereby retiring the executed instructions in-order.

This is a continuation of application Ser. No. 08/946,078, filed Oct. 7,1997, now allowed, which is a continuation of application Ser. No.08/602,021, filed Feb. 15, 1996, now U.S. Pat. No. 5,689,720, which is acontinuation of application Ser. No. 07/817,810, filed Jan. 8, 1992, nowU.S. Pat. No. 5,539,911, which is a continuation of application Ser. No.07/727,006, filed Jul. 8, 1991, now abandoned.

CROSS-REFERENCE TO RELATED APPLICATIONS

1. High-Performance, Superscalar-Based Computer System with Out-Of-OrderInstruction Execution and Concurrent Results Distribution, invented byNguyen et al., application Ser. No. 08/397,016, filed Mar. 1, 1995, nowU.S. Pat. No. 5,560,032, which is a continuation of Ser. No. 07/817,809,filed Jan. 8, 1992,now abandoned, which is a continuation of Ser. No.07/727,058, filed Jul. 8, 1991;

2. A High-Performance Microprocessor Architecture to Support amaximum-Instruction-set Functionality, invented by Nguyen et al.,application Ser. No. 08/292,177, filed Aug. 18, 1994, now abandoned,which is a continuation of Ser. No. 07/817,807, filed Jan. 8, 1992, nowabandoned, which is a continuation of Ser. No. 07/726,744, filed Jul. 8,1991, now abandoned;

3. RISC Microprocessor Architecture Implementing Multiple Typed RegisterSets, invented by Garg et al., application Ser. No. 07/726,773, filedJul. 8, 1991, now U.S. Pat. No. 5,493,687;

4. RISC Microprocessor Architecture Implementing Fast Trap and ExceptionState, invented by Nguyen et al., application Ser. No. 08/345,333, filedNov. 21, 1994, now U.S. Pat. No. 5,481,685, which is a continuation ofSer. No. 08/171,968, filed Dec. 23, 1993, now abandoned, which is acontinuation of Ser. No. 07/817,811, filed Jan. 8, 1992, now abandoned,which is a continuation of Ser. No. 07/726,942, filed Jul. 8, 1991, nowabandoned;

5. Page Printer Controller Including a Single Chip SuperscalarMicroprocessor with Graphics Functional Units, invented by Lentz et al.,application Ser. No. 08/267,646, filed Jun. 28, 1994, now U.S. Pat. No.5,394,515, which is a continuation of Ser. No. 07/817,813, filed Jan. 8,1992, now abandoned, which is a continuation of Ser. No. 07/726,929,filed Jul. 8, 1991, now abandoned; and

6. Microprocessor Architecture with a Switch Network for Data Transferbetween Cache, Memory Port, and IOU, invented by Lentz et al.,application Ser. No. 07/726,893, filed Jul. 8, 1991, now U.S. Pat. No.5,440,752.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention is generally related to the design of RISC typemicroprocessor architectures and, in particular, to RISC microprocessorarchitectures that are capable of executing multiple instructionsconcurrently.

2. Description of the Related Art

Recently, the design of microprocessor architectures have matured fromthe use of Complex Instruction Set Computer (CISC) to simpler ReducedInstruction Set Computer (RISC) Architectures. The CISC architecturesare notable for the provision of substantial hardware to implement andsupport an instruction execution pipeline. The typical conventionalpipeline structure includes, in fixed order, instruction fetch,instruction decode, data load, instruction execute and data storestages. A performance advantage is obtained by the concurrent executionof different portions of a set of instructions through the respectivestages of the pipeline. The longer the pipeline, the greater the numberof execution stages available and the greater number of instructionsthat can be concurrently executed.

Two general problems limit the effectiveness of CISC pipelinearchitectures. The first problem is that conditional branch instructionsmay not be adequately evaluated until a prior condition code settinginstruction has substantially completed execution through the pipeline.

Thus, the subsequent execution of the conditional branch instruction isdelayed, or stalled, resulting in several pipeline stages remaininginactive for multiple processor cycles. Typically, the condition codesare written to a condition code register, also referred to as aprocessor status register (PSR), only at completion of processing aninstruction through the execution stage. Thus, the pipeline must bestalled with the conditional branch instruction in the decode stage formultiple processor cycles pending determination of the branch conditioncode. The stalling of the pipeline results in a substantial loss ofthrough-put. Further, the average through-put of the computer will besubstantially dependent on the mere frequency of conditional branchinstructions occurring closely after the condition code settinginstructions in the program instruction stream.

A second problem arises from the fact that instructions closelyoccurring in the program instruction stream will tend to reference thesame registers of the processor register file. Data registers are oftenused as the destination or source of data in the store and load stagesof successive instructions. In general, an instruction that stores datato the register file must complete processing through at least theexecution stage before the load stage processing of a subsequentinstruction can be allowed to access the register file. Since theexecution of many instructions require multiple processor cycles in thesingle execution stage to produce store data, the entire pipeline istypically stalled for the duration of an execution stage operation.Consequently, the execution through-put of the computer is substantiallydependent on the internal order of the instruction stream beingexecuted.

A third problem arises not so much from the execution of theinstructions themselves, but the maintenance of the hardware supportedinstruction execution environment, or state-of-the-machine, of themicroprocessor itself. Contemporary CISC microprocessor hardwaresub-systems can detect the occurrence of trap conditions during theexecution of instructions. Traps include hardware interrupts, softwaretraps and exceptions. Each trap requires execution of a correspondingtrap handling routines by the processor. On detection of the trap, theexecution pipeline must be cleared to allow the immediate execution ofthe trap handling routine. Simultaneously, the state-of-the-machine mustbe established as of the precise point of occurrence of the trap; theprecise point occurring at the conclusion of the first currentlyexecuting instruction for interrupts and traps and immediately prior toan instruction that fails due to a exception. Subsequently, thestate-of-the-machine and, again depending on the nature of the trap theexecuting instruction itself must be restored at the completion of thehandling routine. Consequently, with each trap or related event, alatency is introduced by the clearing of the pipeline at both theinception and conclusion of the handling routine and storage and returnof the precise state-of-the-machine with corresponding reduction in thethrough-put of the processor.

These problems have been variously addressed in an effort to improve thepotential through-put of CISC architectures. Assumptions can be madeabout the proper execution of conditional branch instructions, therebyallowing pipeline execution to tentatively proceed in advance of thefinal determination of the branch condition code. Assumptions can alsobe made as to whether a register will be modified, thereby allowingsubsequent instructions to also be tentatively executed. Finally,substantial additional hardware can be provided to minimize theoccurrence of exceptions that require execution of handling routines andthereby reduce the frequency of exceptions that interrupt the processingof the program instruction stream.

These solutions,. while obviously introducing substantial additionalhardware complexities, also introduce distinctive problems of their own.The continued execution of instructions in advance of a final resolutionof either a branch condition or register file store access require thatthe state-of-the-machine be restorable to any of multiple points in theprogram instruction stream including the location of the conditionalbranch, each modification of a register file, and for any occurrence ofan exception; potentially to a point prior to the fully completedexecution of the last several instructions. Consequently, even moresupporting hardware is required and, further, must be particularlydesigned not to significantly increase the cycle time of any pipelinestage.

RISC architectures have sought to avoid many of the foregoing problemsby drastically simplifying the hardware implementation of themicroprocessor architecture. In the extreme, each RISC instructionexecutes in only three pipelined program cycles including a load cycle,an execution cycle, and a store cycle. Through the use of load and storedata bypassing, conventional RISC architectures can essentially executea single instruction per cycle in the three stage pipeline.

Whenever possible, hardware support in RISC architectures is minimizedin favor of software routines for performing the required functions.Consequently, the RISC architecture holds out the hope of substantialflexibility and high speed through the use of a simple load/storeinstruction set executed by an optimally matched pipeline. And inpractice, RISC architectures have been found to benefit from the balancebetween a short, high-performance pipeline and the need to executesubstantially greater numbers of instructions to implement all requiredfunctions.

The design of the RISC architecture generally avoids or minimizes theproblems encountered by CISC architectures with regard to branches,register references and exceptions. The pipeline involved in a RISCarchitecture is short and optimized for speed. The shortness of thepipeline minimizes the consequences of a pipeline stall or clear as wellas minimizing the problems in restoring the state-of-the-machine to anearlier execution point.

However, significant through-put performance gains over the generallyrealized present levels cannot be readily achieved by the conventionalRISC architecture. Consequently, alternate, so-called super-scalerarchitectures, have been variously proposed. These architecturesgenerally attempt to execute multiple instructions concurrently andthereby proportionately increase the through-put of the processor.

Unfortunately, such architectures are, again, subject to similar, if notthe same conditional branch, register referencing, and exceptionhandling problems as encountered by CISC architectures.

SUMMARY OF THE INVENTION

Thus, a general purpose of the present invention is to provide ahigh-performance, RISC based, super-scaler processor architecturecapable of substantial performance gains over conventional CISC and RISCarchitectures and that is further suited for microprocessorimplementation.

This purpose is obtained in the present invention through the provisionof a microprocessor architecture capable of the concurrent execution ofinstructions obtained from an instruction store. The microprocessorarchitecture includes an instruction prefetch unit for fetchinginstruction sets from the instruction store. Each instruction setincludes a plurality of fixed length instructions. An instruction FIFOis provided for buffering instruction sets in a plurality of instructionset buffers including a first buffer and a second buffer. An instructionexecution unit, including a register file and a plurality of functionalunits, is provided with an instruction control unit capable of examiningthe instruction sets within the first and second buffers and issuing anyof these instructions for execution by available functional units.Multiple data paths between the functional units and the register fileallow multiple independent accesses to the register file as necessaryfor the concurrent execution of the respective instructions.

The register file includes an additional set of data registers used forthe temporary storage of register data. These temporary data registersare utilized by the instruction execution control unit to receive dataprocessed by the functional units in the out-of-order execution ofinstructions. The data stored in the temporary data registers isselectively held, then cleared or retired to the register file when, andif, the precise state-of-the-machine advances to the instruction'slocation in the instruction stream; where all prior in-orderinstructions have been completely executed and retired.

Finally, the prefetching of instruction sets from the instruction storeis facilitated by multiple prefetch paths allowing for prefetching ofthe main program instruction stream, a target conditional branchinstruction stream and a procedural instruction stream. The targetconditional branch prefetch path enables both possible instructionstreams for a conditional branch instruction, main and target, to besimultaneously prefetched. The procedural instruction prefetch pathallows a supplementary instruction stream, effective for allowingexecution of an extended procedures implementing a singular instructionfound in the main or target instruction streams; the procedural prefetchpath enables these extended procedures to be fetched and executedwithout clearing at least the main prefetch buffers.

Consequently, an advantage of the present invention is that it providesan architecture that realizes extremely high performance through-pututilizing a fundamentally RISC type core architecture.

Another advantage of the present invention is that it provides for theexecution of multiple instructions per cycle.

A further advantage of the present invention is that it provides for thedynamic selection and utilization of functional units necessary tooptimally execute multiple instructions concurrently.

Still another advantage of the present invention is that it provides fora register file unit that integrally incorporates a mechanism forsupporting a precise state-of-the-machine return capability.

Yet another advantage of the present invention is that it incorporatesmultiple register files within the register file unit that aregeneralized, typed and capable of multiple register file functionsincluding operation as multiple independent and parallel integerregister files, operation of a register file as both a floating pointand integer file and operation of a dedicated boolean register file.

A still further advantage of the present invention is that load andstore operations and the handling of exceptions and interrupts can beperformed in a precise manner through the use of a precisestate-of-the-machine return capability including efficient instructioncancellation mechanisms and a load/store order synchronizer.

A yet still further advantage of the present invention is the provisionfor dedicated register file unit support of trap states so as tominimize latency and enhance processing through-put.

Yet still another advantage of the present invention is the provisionfor main and target branch instruction prefetch queues whereby evenincorrect target branch stream execution ahead minimally impacts theoverall processing through-put obtainable by the present invention.Further, the procedural instruction prefetch queue allows an efficientmanner of intervening in the execution of the main or target branchinstruction streams to allow the effective implementation of newinstructions through the execution of procedural routines and,significantly, the externally provided revision of procedural routinesimplementing built-in procedural instructions.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other advantages and features of the present invention willbecome better understood upon consideration of the following detaileddescription of the invention when considered in connection of theaccompanying drawings, in which like reference numerals designate likeparts throughout the figures thereof, and wherein:

FIG. 1 is a simplified block diagram of the preferred microprocessorarchitecture implementing the present invention;

FIG. 2 is a detailed block diagram of the instruction fetch unitconstructed in accordance with the present invention;

FIG. 3 is a block diagram of the program counter logic unit constructedin accordance with the present invention;

FIG. 4 is a further detailed block diagram of the program counter dataand control path logic;

FIG. 5 is a simplified block diagram of the instruction execution unitof the present invention;

FIG. 6A is a simplified block diagram of the register file architectureutilized in a preferred embodiment of the present invention.

FIG. 6B is a graphic illustration of the storage register format of thetemporary buffer register file and utilized in a preferred embodiment ofthe present invention;

FIG. 6C is a graphic illustration of the primary and secondaryinstruction sets as present in the last two stages of the instructionFIFO unit of the present invention;

FIGS. 7A, 7B, and 7C provide a graphic illustration of thereconfigurable states of the primary integer register set as provided inaccordance with a preferred embodiment of the present invention;

FIG. 8 is a graphic illustration of a reconfigurable floating point andsecondary integer register set as provided in accordance with thepreferred embodiment of the present invention;

FIG. 9 is a graphic illustration of a tertiary boolean register set asprovided in a preferred embodiment of the present invention;

FIG. 10 is a detailed block diagram of the primary integer processingdata path portion of the instruction execution unit constructed inaccordance with the preferred embodiment of the present invention;

FIG. 11 is a detailed block diagram of the primary floating point datapath portion of the instruction execution unit constructed in accordancewith a preferred embodiment of the present invention;

FIG. 12 is a detailed block diagram of the boolean operation data pathportion of the instruction execution unit as constructed in accordancewith the preferred embodiment of the present invention;

FIG. 13 is a detailed block diagram of a load/store unit constructed inaccordance with the preferred embodiment of the present invention;

FIG. 14 is a timing diagram illustrating the preferred sequence ofoperation of a preferred embodiment of the present invention inexecuting multiple instructions in accordance with the presentinvention;

FIG. 15 is a simplified block diagram of the virtual memory control unitas constructed in accordance with the preferred embodiment of thepresent invention;

FIG. 16 is a graphic representation of the virtual memory controlalgorithm as utilized in a preferred embodiment of the presentinvention; and

FIG. 17 is a simplified block diagram of the cache control unit asutilized in a preferred embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

I. Microprocessor Architectural Overview

II. Instruction Fetch Unit

A) IFU Data Path

B) IFU Control Path

C) IFU/IEU Control Interface

D) PC Logic Unit Detail

1) PF and ExPC Control/Data Unit Detail

2) PC Control Algorithm Detail

E) Interrupt and Exception Handling

1) Overview

2) Asynchronous Interrupts

3) Synchronous Exceptions

4) Handler Dispatch and Return

5) Nesting

6) List of Traps

III. Instruction Execution Unit

A) IEU Data Path Detail

1) Register File Detail

2) Integer Data Path Detail

3) Floating Point Data Path Detail

4) Boolean Register Data Path Detail

B) Load/Store Control Unit

C) IEU Control Path Detail

1) EDecode Unit Detail

2) Carry Checker Unit Detail

3) Data Dependency Checker Unit Detail

4) Register Rename Unit Detail

5) Instruction Issuer Unit Detail

6) Done Control Unit Detail

7) Retirement Control Unit Detail

8) Control Flow Control Unit Detail

9) Bypass Control Unit Detail

IV. Virtual Memory Control Unit

V. Cache Control Unit

VI. Summary/Conclusion

I. Microprocessor Architectural Overview

The architecture 100 of the present invention is generally shown inFIG. 1. An Instruction Fetch Unit (IFU) 102 and an Instruction ExecutionUnit (IEU) 104 are the principal operative elements of the architecture100. A Virtual Memory Unit (VMU) 108, Cache Control Unit (CCU) 106, andMemory Control Unit (MCU) 110 are provided to directly support thefunction of the IFU 102 and IEU 104. A Memory Array Unit (MAU) 112 isalso provided as a generally essential element for the operation of thearchitecture 100, though the MAU 112 does not directly exist as anintegral component of the architecture 100. That is, in the preferredembodiments of the present invention, the IFU 102, IEU 104, VMU 108, CCU106, and MCU 110 are fabricated on a single silicon die utilizing aconventional 0.8 micron design rule low-power CMOS process andcomprising some 1,200,000 transistors. The standard processor or systemclock speed of the architecture 100 is 40 MHz. However, in accordancewith a preferred embodiment of the present invention, the internalprocessor clock speed is 160 MHz.

The IFU 102 is primarily responsible for the fetching of instructions,the buffering of instructions pending execution by the IEU 104, and,generally, the calculation of the next virtual address to be used forthe fetching of next instructions.

In the preferred embodiments of the present invention, instructions areeach fixed at a length of 32 bits. Instruction sets, or "buckets" offour instructions, are fetched by the IFU 102 simultaneously from aninstruction cache 132 within the CCU 106 via a 128 bit wide instructionbus 114. The transfer of instruction sets is coordinated between the IFU102 and CCU 106 by control signals provided via a control bus 116. Thevirtual address of a instruction set to be fetched is provided by theIFU 102 via an IFU combined arbitration, control and address bus 118onto a shared arbitration, control and address bus 120 further coupledbetween the IEU 104 and VMU 108. Arbitration for access to the VMU 108arises from the fact that both the IFU 102 and IEU 104 utilize the VMU108 as a common, shared resource. In the preferred embodiment of thearchitecture 100, the low order bits defining an address within aphysical page of the virtual address are transferred directly by the IFU102 to the Cache Control Unit 106 via the control lines 116. Thevirtualizing, high order bits of the virtual address supplied by the IFU102 are provided by the address portion of the buses 118, 120 to the VMU108 for translation into a corresponding physical page address. For theIFU 102, this physical page address is transferred directly from the VMU108 to the Cache Control Unit 106 via the address control lines 122one-half internal processor cycle after the translation request isplaced with the VMU 108.

The instruction stream fetched by the IFU 102 is, in turn, provided viaan instruction stream bus 124 to the IEU 104. Control signals areexchanged between the IFU 102 and the IEU 104 via controls lines 126. Inaddition, certain instruction fetch addresses, typically those requiringaccess to the register file present within the IEU 104, are providedback to the IFU via a target address return bus within the control lines126.

The IEU 104 stores and retrieves data with respect to a data cache 134provided within the CCU 106 via an 80-bit wide bi-directional data bus130. The entire physical address for IEU data accesses is provided viaan address portion of the control bus 128 to the CCU 106. The controlbus 128 also provides for the exchange of control signals between theIEU 104 and CCU 106 for managing data transfers. The IEU 104 utilizesthe VMU 108 as a resource for converting virtual data address intophysical data addresses suitable for submission to the CCU 106. Thevirtualizing portion of the data address is provided via thearbitration, control and address bus 120 to the VMU 108. Unlikeoperation with respect to the IFU 102, the VMU 108 returns thecorresponding physical address via the bus 120 to the IEU 104. In thepreferred embodiments of the architecture 100, the IEU 104 requires thephysical address for use in ensuring that load/store operations occur inproper program stream order.

The CCU 106 performs the generally conventional high-level function ofdetermining whether physical address defined requests for data can besatisfied from the instruction and data caches 132, 134, as appropriate.Where the access request can be properly fulfilled by access to theinstruction or data caches 132, 134, the CCU 106 coordinates andperforms the data transfer via the data buses 114, 128.

Where a data access request cannot be satisfied from the instruction ordata caches 132, 134, the CCU 106 provides the corresponding physicaladdress to the MCU 110 along with sufficient control information toidentify whether a read or write access of the MAU 112 is desired, thesource or destination cache 132, 134 of the CCU 106 for each request,and additional identifying information to allow the request operation tobe correlated with the ultimate data request as issued by the IFU 102 orIEU 104.

The MCU 110 preferably includes a port switch unit 142 that is coupledby a uni-directional data bus 136 with the instruction cache 132 of theCCU 106 and a bi-directional data bus 138 to the data cache 134. Theport switch 142 is, in essence, a large multiplexer allowing a physicaladdress obtained from the control bus 140 to be routed to any one of anumber of ports P₀ -P_(N) 146_(0-n) and the bidirectional transfer ofdata from the ports to the data buses 136, 138. Each memory accessrequest processed by the MCU 110 is associated with one of the ports146_(0-n) for purposes of arbitrating for access to the main systemmemory bus 162 as required for an access of the MAU 112. Once a datatransfer connection has been established, the MCU provides controlinformation via the control bus 140 to the CCU 106 to initiate thetransfer of data between either the instruction or data cache 132, 134and MAU 112 via the port switch 142 and the corresponding one of theports 146_(0-n). In accordance with the preferred embodiments of thearchitecture 100 the MCU 110 does not actually store or latch data intransit between the CCU 106 and MAU 112. This is done to minimizelatency in the transfer and to obviate the need for tracking or managingdata that may be uniquely present in the MCU 110.

II. Instruction Fetch Unit

The primary elements of the Instruction Fetch Unit 102 are shown in FIG.2. The operation and interrelationship of these elements can best beunderstood by considering their participation in the IFU data andcontrol paths.

A) IFU Data Path:

The IFU data path begins with the instruction bus 114 that receivesinstruction sets for temporary storage in a prefetch buffer 260. Aninstruction set from the prefetch buffer 260 is passed through anIDecode unit 262 and then to an IFIFO unit 264. Instruction sets storedin the last two stages of the instruction FIFO 264 are continuouslyavailable, via the data buses 278, 280, to the IEU 104.

The prefetch buffer unit 260 receives a single instruction set at a timefrom the instruction bus 114. The full 128 bit wide instruction set isgenerally written in parallel to one of four 128 bit wide prefetchbuffer locations in a Main Buffer (MBUF) 188 portion of the prefetchbuffer 260. Up to four additional instruction sets may be similarlywritten into two 128 bit wide Target Buffer (TBUF) 190 prefetch bufferlocations or to two 128 bit wide Procedural Buffer (EBUF) 192 prefetchbuffer locations. In the preferred architecture 100, an instruction setin any one of the prefetch buffer locations within the MBUF 188, TBUF190 or EBUF 192 may be transferred to the prefetch buffer output bus196. In addition, a direct fall through instruction set bus 194 isprovided to connect the instruction bus 114 directly with the prefetchbuffer output bus 196, thereby bypassing the MBUF, TBUF and EBUF 188,190, 192.

In the preferred architecture 100, the MBUF 188 is utilized to bufferinstruction sets in the nominal or main instruction stream. The TBUF 190is utilized to buffer instruction sets fetched from a tentative targetbranch instruction stream. Consequently, the prefetch buffer unit 260allows both possible instruction streams following a conditional branchinstruction to be prefetched. This facility obviates the latency forfurther accesses to at least the CCU 106, if not the substantiallygreater latency of a MAU 112, for obtaining the correct next instructionset for execution following a conditional branch instruction regardlessof the particular instruction stream eventually selected upon resolutionof the conditional branch instruction. In the preferred architecture 100invention, the provision of the MBUF 188 and TBUF 190 allow theinstruction fetch unit 102 to prefetch both potential instructionstreams and, as will be discussed below in relationship to theinstruction execution unit 104, to further allow execution of thepresumed correct instruction stream. Where, upon resolution of theconditional branch instruction, the correct instruction stream has beenprefetched into the MBUF 188, any instruction sets in the TBUF 190 maybe simply invalidated. Alternately, where instruction sets of thecorrect instruction stream are present in the TBUF 190, the instructionprefetch buffer unit 260 provides for the direct, lateral transfer ofthose instruction sets from the TBUF 190 to respective buffer locationsin the MBUF 188. The prior MBUF 188 stored instruction sets areeffectively invalidated by being overwritten by the TBUF 190 transferredinstruction sets. Where there is no TBUF instruction set transferred toan MBUF location, that location is simply marked invalid.

Similarly, the EBUF 192 is provided as another, alternate prefetch paththrough the prefetch buffer 260. The EBUF 192 is preferably utilized inthe prefetching of an alternate instruction stream that is used toimplement an operation specified by a single instruction, a "procedural"instruction, encountered in the MBUF 188 instruction stream. In thismanner, complex or extended instructions can be implemented throughsoftware routines, or procedures, and processed through the prefetchbuffer unit 260 without disturbing the instruction streams alreadyprefetched into the MBUF 188. Although the present invention generallypermits handling of procedural instructions that are first encounteredin the TBUF 190, prefetching of the procedural instruction stream isheld until all prior pending conditional branch instructions areresolved. This allows conditional branch instructions occurring in theprocedural instruction stream to be consistently handled through the useof the TBUF 190. Thus, where a branch is taken in the procedural stream,the target instruction sets will have been prefetched into the TBUF 190and can be simply laterally transferred to the EBUF 192.

Finally, each of the MBUF 188, TBUF 190 and EBUF 192 are coupled to theprefetch buffer output bus 196 so as to provide any instruction setstored by the prefetch unit onto the output bus 196. In addition, a flowthrough bus 194 is provided to directly transfer an instruction set fromthe instruction bus 114 directly to the output bus 196.

In the preferred architecture 100, the prefetch buffers within the MBUF188, TBUF 190, EBUF 192 do not directly form a FIFO structure. Instead,the provision of an any buffer location to output bus 196 connectivityallows substantial freedom in the prefetch ordering of instruction setsretrieved from the instruction cache 132. That is, the instruction fetchunit 102 generally determines and requests instruction sets in theappropriate instruction stream order of instructions. However, the orderin which instruction sets are returned to the IFU 102 is allowed tooccur out-of-order as appropriate to match the circumstances where somerequested instruction sets are available and accessible from the CCU 106alone and others require an access of the MAU 112.

Although instruction sets may not be returned in order to the prefetchbuffer unit 260, the sequence of instruction sets output on the outputbus 196 must generally conform to the order of instruction set requestsissued by the IFU 102; the in-order instruction stream sequence subjectto, for example, tentative execution of a target branch stream.

The IDecode unit 262 receives the instruction sets, generally one percycle, IFIFO unit 264 space permitting, from the prefetch buffer outputbus 196. Each set of four instructions that make up a single instructionset is decoded in parallel by the IDecode unit 262. While relevantcontrol flow information is extracted via lines 318 for the benefit ofthe control path portion of the IFU 102, the contents of the instructionset is not altered by the IDecode unit 262.

Instruction sets from the IDecode Unit 162 are provided onto a 128 bitwide input bus 198 of the IFIFO unit 264. Internally, the IFIFO unit 264consists of a sequence of master/slave registers 200, 204, 208, 212,216, 220, 224. Each register is coupled to its successor to allow thecontents of the master registers 200, 208, 216 to be transferred duringa first half internal processor cycle of FIFO operation to the slaveregisters 204, 212, 220 and then to the next successive master register:208, 216, 224 during the succeeding half-cycle of operation. The inputbus 198 is connected to the input of each of the master registers 200,208, 216, 224 to allow loading of an instruction set from the IDecodeunit 262 directly in to a master register during the second half-cycleof FIFO operation. However, loading of a master register from the inputbus 198 need not occur simultaneously with a FIFO shift of data withinthe IFIFO unit 264. Consequently, the IFIFO unit 264 can be continuouslyfilled from the input bus 198 regardless of the current depth ofinstruction sets stored within the instruction FIFO unit 264 and,further, independent of the FIFO shifting of data through the IFIFO unit264.

Each of the master/slave registers 200, 204, 208, 212, 216, 220, 224, inaddition to providing for the full parallel storage of a 128 bit wideinstruction set, also provides for the storage of several bits ofcontrol information in the respective control registers 202, 206, 210,214, 218, 222, 226. The preferred set of control bits include exceptionmiss and exception modify, (VMU), no memory (MCU), branch bias, stream,and offset (IFU). This control information originates from the controlpath portion of the IFU 102 simultaneous with the loading of an IFIFOmaster register with a new instruction set from the input bus 198.Thereafter, the control register information is shifted in parallelconcurrently with the instruction sets through the IFIFO unit 264.

Finally, in the preferred architecture 100, the output of instructionsets from the IFIFO unit 264 is obtained simultaneously from the lasttwo master registers 216, 224 on the I₋₋ Bucket₋₋ 0 and I₋₋ Bucket₋₋ 1instruction set output buses 278, 280. In addition, the correspondingcontrol register information is provided on the IBASV0 and IBASV1control field buses 282, 284. These output buses 278, 282, 280, 284 areall provided as the instruction stream bus 124 to the IEU 104.

B) IFU Control Path:

The control path for the IFU 102 directly supports the operation of theprefetch buffer unit 260, IDecode unit 262 and IFIFO unit 264. Aprefetch control logic unit 266 primarily manages the operation of theprefetch buffer unit 260. The prefetch control logic unit 266 and IFU102 in general, receives the system clock signal via the clock line 290for synchronizing IFU operations with those of the IEU 104, CCU 106 andVMU 108. Control signals appropriate for the selection and writing ofinstruction sets into the MBUF 188, TBUF 190 and EBUF 192 are providedon the control lines 304.

A number of control signals are provided on the control lines 316 to theprefetch control logic unit 266. Specifically, a fetch request controlsignal is provided to initiate a prefetch operation. Other controlsignals provided on the control line 316 identify the intendeddestination of the requested prefetch operation as being the MBUF 188,TBUF 190 or EBUF 192. In response to a prefetch request, the prefetchcontrol logic unit 266 generates an ID value and determines whether theprefetch request can be posted to the CCU 106. Generation of the IDvalue is accomplished through the use of a circular four-bit counter.

The use of a four-bit counter is significant in three regards. The firstis that, typically a maximum of nine instruction sets may be active atone time in the prefetch buffer unit 260; four instruction sets in theMBUF 188, two in the TBUF 190, two in the EBUF 192 and one provideddirectly to the IDecode unit 262 via the flow through bus 194. Secondly,instruction sets include four instructions of four bytes each.Consequently, the least significant four bits of any address selectingan instruction set for fetching are superfluous. Finally, the prefetchrequest ID value can be easily associated with a prefetch request byinsertion as the least significant four bits of the prefetch requestaddress; thereby reducing the total number of address lines required tointerface with the CCU 106.

To allow instruction sets to be returned by the CCU 106 out-of-orderwith respect to the sequence of prefetch requests issued by the IFU 102,the architecture 100 provides for the return of the ID request valuewith the return of instruction sets from the CCU 106. However, theout-of-order instruction set return capability may result in exhaustionof the sixteen unique IDs. A combination of conditional instructionsexecuted out-of-order, resulting in additional prefetches andinstruction sets requested but not yet returned can lead to potentialre-use of an ID value. Therefore, the four-bit counter is preferablyheld, and no further instruction set prefetch requests issued, where thenext ID value would be the same as that associated with an as yetoutstanding fetch request or another instruction set then pending in theprefetch buffer 260.

The prefetch control logic unit 266 directly manages a prefetch statusarray 268 which contains status storage locations logicallycorresponding to each instruction set prefetch buffer location withinthe MBUF 188, TBUF 190 and EBUF 192. The prefetch control logic unit266, via selection and data lines 306, can scan, read and write data tothe status register array 268. Within the array 268, a main bufferregister 308 provides for storage of four, four-bit ID values (MB ID),four single-bit reserved flags (MB RES) and four single-bit valid flags(MB VAL), each corresponding by logical bit-position to the respectiveinstruction set storage locations within the MBUF 180. Similarly, atarget buffer register 310 and extended buffer register 312 each providefor the storage of two four-bit ID values (TB ID, EB ID), two single-bitreserved flags (TB RES, EB RES), and two single-bit valid flags (TB VAL,EB VAL). Finally, a flow through status register 314 provides for thestorage of a single four-bit ID value (FT ID), a single reserved flagbit (FT RES), and a single valid flag bit (FT VAL).

The status register array 268 is first scanned and, as appropriate,updated by the prefetch control logic unit 266 each time a prefetchrequest is placed with the CCU 106 and subsequently scanned and updatedeach time an instruction set is returned. Specifically, upon receipt ofthe prefetch request signal via the control lines 316, the prefetchcontrol logic unit 266 increments the current circular counter generatedID value, scans the status register array 268 to determine whether theID value is available for use and whether a prefetch buffer location ofthe type specified by the prefetch request signal is available, examinesthe state of the CCU IBUSY control line 300 to determine whether the CCU106 can accept a prefetch request and, if so, asserts a CCU IREADcontrol signal on the control line 298, and places the incremented IDvalue on the CCU ID out bus 294 to the CCU 106. A prefetch storagelocation is available for use where both of the corresponding reservedand valid status flags are false. The prefetch request ID is writteninto the ID storage location within the status register array 268corresponding to the intended storage location within the MBUF 188, TBUF190, or EBUF 192 concurrent with the placement of the request with theCCU 106. In addition, the corresponding reserved status flag is settrue.

When the CCU 106 is able to return a previously requested instructionset to the IFU 102, the CCU IREADY signal is asserted on control line302 and the corresponding instruction set ID is provided on the CCU IDcontrol lines 296. The prefetch control logic unit 266 scans the IDvalues and reserved flags within the status register array 268 toidentify the intended destination of the instruction set within theprefetch buffer unit 260., Only a single match is possible. Onceidentified, the instruction set is written via the bus 114 into theappropriate location within the prefetch buffer unit 260 or, ifidentified as a flow through request, provided directly to the IDecodeunit 262. In either case, the valid status flag in the correspondingstatus register array is set true.

The PC logic unit 270, as will be described below in greater detail,tracks the virtual address of the MBUF 188, TBUF 190 and EBUF 192instruction streams through the entirety of the IFU 102. In performingthis function, the PC logic block 270 both controls and operates fromthe IDecode unit 262. Specifically, portions of the instructions decodedby the IDecode unit 262 potentially relevant to a change in the programinstruction stream flow are provided on the bus 318 to a control flowdetection unit 274 and directly to the PC logic block 270. The controlflow detection unit 274 identifies each instruction in the decodedinstruction set that constitutes a control flow instruction includingconditional and unconditional branch instructions, call typeinstructions, software traps procedural instructions and various returninstructions. The control flow detection unit 274 provides a controlsignal, via lines 322, to the PC logic unit 270 to identify the locationand specific nature of the control flow instructions within theinstruction set present in the IDecode unit 262. The PC logic unit 270,in turn, determines the target address of the control flow instruction,typically from data provided within the instruction and transferred tothe PC logic unit via lines 318. Where, for example, a branch logic biashas been selected to execute ahead for conditional branch instructions,the PC logic unit 270 will begin to direct and separately track theprefetching of instruction sets from the conditional branch instructiontarget address. Thus, with the next assertion of a prefetch request onthe control lines 316, the PC logic unit 270 will further assert acontrol signal, via lines 316, selecting the destination of the prefetchto be the TBUF 190, assuming that prior prefetch instruction sets weredirected to the MBUF 188 or EBUF 192. Once the prefetch control logicunit 266 determines that a prefetch request can be supplied to the CCU106, the prefetch control logic unit 266 provides an enabling signal,again via lines 316, to the PC logic unit 270 to enable the provision ofa page offset portion of the target address (CCU PADDR 13:4!) via theaddress lines 324 directly to the CCU 106. At the same time, the PClogic unit 270, where a new virtual to physical page translation isrequired further provides a VMU request signal via control line 328 andthe virtualizing portion of the target address (VMU VADDR 31:14!) viathe address lines 326 to the VMU 108 for translation into a physicaladdress. Where a page translation is not required, no operation by theVMU 108 is required. Rather, the previous translation result ismaintained in an output latch coupled to the bus 122 for immediate useby the CCU 106.

Operational errors in the VMU 108 in performing the virtual to physicaltranslation requested by the PC logic unit 270 are reported via the VMUexception and VMU miss control lines 332, 334. The VMU miss control line334 reports a translation lookaside buffer (TLB) miss. The VMU exceptioncontrol signal, on VMU exception line 332, is raised for all otherexceptions. In both cases, the PC logic unit handles the error conditionby storing the current execution point in the instruction stream andthen prefetching, as if in response to an unconditional branch, adedicated exception handling routine instruction stream for diagnosingand handling the error condition. The VMU exception and miss controlsignals identify the general nature of the exception encountered,thereby allowing the PC logic unit 270 to identify the prefetch addressof a corresponding exception handling routine.

The IFIFO control logic unit 272 is provided to directly support theIFIFO unit 264. Specifically, the PC logic unit 270 provides a controlsignal via the control lines 336 to signal the IFIFO control logic unit272 that an instruction set is available on the input bus 198 from theIDecode unit 262. The IFIFO control unit 272 is responsible forselecting the deepest available master register 200, 208, 216, 224 forreceipt of the instruction set. The output of each of the master controlregisters 202, 210, 218, 226 is provided to the IFIFO control unit 272via the control bus 338. The control bits stored by each master controlregister includes a two-bit buffer address (IF₋₋ Bx₋₋ ADR), a singlestream indicator bit (IF₋₋ Bx₋₋ STRM), and a single valid bit (IF₋₋ Bx₋₋VLD). The two bit buffer address identifies the first valid instructionwithin the corresponding instruction set. That is, instruction setsreturned by the CCU 106 may not be aligned such that the targetinstruction of a branch operation, for example, is located in theinitial instruction location within the instruction set. Thus, thebuffer address value is provided to uniquely identify the initialinstruction within an instruction set that is to be considered forexecution.

The stream bit is used essentially as a marker to identify the locationof instruction sets containing conditional control flow instructions,and giving rise to potential control flow changes, in the stream ofinstructions through the IFIFO unit 264. The main instruction stream isprocessed through the MBUF 188 generally with a stream bit value of 0.On the occurrence of a relative conditional branch instruction, forexample, the corresponding instruction set is marked with a stream bitvalue of 1. The conditional branch instruction is detected by theIDecode unit 262. Up to four conditional control flow instructions maybe present in the instruction set. The instruction set is then stored inthe deepest available master register of the IFIFO unit 264.

In order to determine the target address of the conditional branchinstruction, the current IEU 104 execution point address (DPC), therelative location of the conditional instruction containing instructionset as identified by the stream bit, and the conditional instructionlocation offset in the instruction set, as provided by the control flowdetector 274, are combined with the relative branch offset value asobtained from a corresponding branch instruction field via control lines318. The result is a branch target virtual address that is stored by thePC logic unit 270. The initial instruction sets of the targetinstruction stream may then be prefetched into the TBUF 190 utilizingthis address.

Depending on the preselected branch bias selected for the PC logic unit270, the IFIFO unit 264 will continue to be loaded from either the MBUF188 or TBUF 190. If a second instruction set containing one or moreconditional flow instructions is encountered, the instruction set ismarked with a stream bit value of 0. Since a second target stream cannotbe fetched, the target address is calculated and stored by the PC logicunit 270, but no prefetch is performed. In addition, no furtherinstruction sets can be processed through the IDecode unit 262, or atleast none that are found to contain a conditional flow controlinstruction.

The PC logic unit 270, in the preferred embodiments of the presentinvention, can manage up to eight conditional flow instructionsoccurring in up to two instruction sets. The target addresses for eachof the two instruction sets marked by stream bit changes are stored inan array of four address registers with each target address positionedlogically with respect to the location of the corresponding conditionalflow instruction in the instruction set.

Once the branch result of the first in-order conditional flowinstruction is resolved, the PC logic unit 270 will direct the prefetchcontrol unit 260, via control signals on lines 316, to transfer thecontents of the TBUF 190 to the MBUF 188, if the branch is taken, and tomark invalid the contents of the TBUF 190. Any instruction sets in theIFIFO unit 264 from the incorrect instruction stream, target stream ifthe branch is not taken and main stream if the branch is taken, arecleared from the IFIFO unit 264. If a second or subsequent conditionalflow control instruction exists in the first stream bit markedinstruction set, that instruction is handled in a consistent manner: theinstruction sets from the target stream are prefetched, instruction setsfrom the MBUF 188 or TBUF 190 are processed through the IDecode unit 262depending on the branch bias, and the IFIFO unit 264 is cleared ofincorrect stream instruction sets when the conditional flow instructionfinally resolves.

If a secondary conditional flow instruction set remains in the IFIFOunit 264 once the IFIFO unit 264 is cleared of incorrect streaminstruction sets, and the first conditional flow instruction setcontains no further conditional flow instructions, the target addressesof the second stream bit marked instruction set are promoted to thefirst array of address registers. In any case, a next instruction setcontaining conditional flow instructions can then be evaluated throughthe IDecode unit 262. Thus, the toggle usage of the stream bit allowspotential control flow changes to be marked and tracked through theIFIFO unit 264 for purposes of calculating branch target addresses andfor marking the instruction set location above which to clear where thebranch bias is subsequently determined to have been incorrect for aparticular conditional flow control instruction.

Rather than actually clearing instruction sets from the masterregisters, the IFIFO control logic unit 272 simply resets the valid bitflag in the control registers of the corresponding master registers ofthe IFIFO unit 264. The clear operation is instigated by the PC logicunit 270 in a control signal provided on lines 336. The inputs of eachof the master control registers 202, 210, 218, 226 are directlyaccessible by the IFIFO control logic unit 272 via the status bus 230.In the preferred architecture 100, the bits within these master controlregisters 202, 210, 218, 226 may be set by the IFIFO control unit 272concurrent with or independent of a data shift operation by the IFIFOunit 264. This capability allows an instruction set to be written intoany of the master registers 200, 208, 216, 224, and the correspondingstatus information to be written into the master control registers 202,210, 218, 226 asynchronously with respect to the operation of the IEU104.

Finally, an additional control line on the control and status bus 230enables and directs the FIFO operation of the IFIFO unit 264. An IFIFOshift is performed by the IFIFO control logic unit 272 in response tothe shift request control signal provided by the PC logic unit 270 viathe control lines 336. The IFIFO control unit 272, based on theavailability of a master register 200, 208, 216, 224 to receive aninstruction set provides a control signal, via lines 316, to theprefetch control unit 266 to request the transfer of a next appropriateinstruction set from the prefetch buffers 260. On transfer of theinstruction set, the corresponding valid bit in the array 268 is reset.

C) IFU/IEU Control Interface:

The control interface between the IFU 102 and IEU 104 is provided by thecontrol bus 126. This control bus 126 is coupled to the PC logic unit270 and consists of a number of control, address and specialized datalines. Interrupt request and acknowledge control signals, as passed viathe control lines 340, allow the IFU 102 to signal and synchronizeinterrupt operations with the IEU 104. An externally generated interruptsignal is provided on a line 292 to the logic unit 270. In response, aninterrupt request control signal, provided on lines 340, causes the IEU104 to cancel tentatively executed instructions. Information regardingthe nature of an interrupt is exchanged via interrupt information lines341. When the IEU 104 is ready to begin receiving instruction setsprefetched from the interrupt service routine address determined by thePC logic unit 270, the IEU 104 asserts an interrupt acknowledge controlsignal on the lines 340. Execution of the interrupt service routine, asprefetched by the IFU 102, will then commence.

An IFIFO read (IFIFO RD) control signal is provided by the IEU 104 tosignal that the instruction set present in the deepest master register224 has been completely executed and that a next instruction set isdesired. Upon receipt of this control signal, the PC logic unit 270directs the IFIFO control logic unit 272 to perform a IFIFO shiftoperation on the IFIFO unit 264.

A PC increment request and size value (PC INC/SIZE) is provided on thecontrol lines 344 to direct the PC logic unit 270 to update the currentprogram counter value by a corresponding size number of instructions.This allows the PC logic unit 270 to maintain a point of executionprogram counter (DPC) that is precise to the location of the firstin-order executing instruction in the current program instructionstream.

A target address (TARGET ADDR) is returned on the address lines 346 tothe PC logic unit 270. The target address is the virtual target addressof a branch instruction that depends on data stored within the registerfile of the IEU 104. Operation of the IEU 104 is therefore required tocalculate the target address.

Control flow result (CF RESULT) control signals are provided on thecontrol lines 348 to the PC logic unit 270 to identify whether anycurrently pending conditional branch instruction has been resolved andwhether the result is either a branch taken or not taken. Based on thesecontrol signals, the PC logic unit 270 can determine which of theinstruction sets in the prefetch buffer 260 and IFIFO unit 264 must becancelled, if at all, as a consequence of the execution of theconditional flow instruction.

A number of IEU instruction return type control signals (IEU Return) areprovided on the control lines 350 to alert the IFU 102 to the executionof certain instructions by the IEU 104. These instructions include areturn from procedural instruction, return from trap, and return fromsubroutine call. The return from trap instruction is used equally inhardware interrupt and software trap handling routines. The subroutinecall return is also used in conjunction with jump-and-link type calls.In each case, the return control signals are provided to alert the IFU102 to resume its instruction fetching operation with respect to thepreviously interrupted instruction stream. Origination of the signalsfrom the IEU 104 allows the precise operation of the system 100 to bemaintained; the resumption of an "interrupted" instruction stream isperformed at the point of execution of the return instruction.

A current instruction execution PC address (Current IF₋₋ PC) is providedon an address bus 352 to the IEU 104. This address value, the DPC,identifies the precise instruction being executed by the IEU 104. Thatis, while the IEU 104 may tentatively execute ahead instructions pastthe current IF₋₋ PC address, this address must be maintained forpurposes of precise control of the architecture 100 with respect to theoccurrence of interrupts, exceptions, and any other events that wouldrequire knowing the precise state-of-the-machine. When the IEU 104determines that the precise state-of-the-machine in the currentlyexecuting instruction stream can be advanced, the PC Inc/Size signal isprovided to the IFU 102 and immediately reflected back in the currentIF₋₋ PC address value.

Finally, an address and bi-directional data bus 354 is provided for thetransfer of special register data. This data may be programmed into orread from special registers within the IFU 102 by the IEU 104. Specialregister data is generally loaded or calculated by the IEU 104 for useby the IFU 102.

D) PC Logic Unit Detail:

A detailed diagram of the PC Logic unit 270 including a PC control unit362, interrupt control unit 363, prefetch PC control unit 364 andexecution PC control unit 366, is shown in FIG. 3. The PC control unit362 provides timing control over the prefetch and execution PC controlunits 364, 366 in response to control signals from the prefetch controllogic unit 266, IFIFO control logic unit 272, and the IEU 104, via theinterface bus 126. The Interrupt Control Unit 363 is responsible formanaging the precise processing of interrupts and exceptions, includingthe determination of a prefetch trap address offset that selects anappropriate handling routine to process a respective type of trap. Theprefetch PC control unit 364 is, in particular, responsible for managingprogram counters necessary to support the prefetch buffers 188, 190,192, including storing return addresses for traps handling andprocedural routine instruction flows. In support of this operation, theprefetch PC control unit 364 is responsible for generating the prefetchvirtual address including the CCU PADDR address on the physical addressbus lines 324 and the VMU VMADDR address on the address lines 326.Consequently, the prefetch PC control unit 364 is responsible formaintaining the current prefetch PC virtual address value.

The prefetch operation is generally initiated by the IFIFO control logicunit 272 via a control signal provided on the control lines 316. Inresponse, the PC control unit 362 generates a number of control signalsprovided on the control lines 372 to operate the prefetch PC controlunit 364 to generate the PADDR and, as needed, the VMADDR addresses onthe address lines 324, 326. An increment signal, having a value of 0 tofour, may be also provided on the control lines 374 depending on whetherthe PC control unit 362 is re-executing an instruction set fetch at thepresent prefetch address, aligning for the second in a series ofprefetch requests, or selecting the next full sequential instruction setfor prefetch. Finally, the current prefetch address PF₋₋ PC is providedon the bus 370 to the execution PC control unit 366.

New prefetch addresses originate from a number of sources. A primarysource of addresses is the current IF₋₋ PC address provided from theexecution PC control unit 366 via bus 352. Principally, the IF₋₋ PCaddress provides a return address for subsequent use by the prefetch PCcontrol unit 364 when an initial call, trap or procedural instructionoccurs. The IF₋₋ PC address is stored in registers in the prefetch PCcontrol unit 364 upon each occurrence of these instructions. In thismanner, the PC control unit 362, on receipt of a IEU return signal, viacontrol lines 350, need merely select the corresponding return addressregister within the prefetch PC control unit 364 to source a newprefetch virtual address, thereby resuming the original programinstruction stream.

Another source of prefetch addresses is the target address valueprovided on the relative target address bus 382 from the execution PCcontrol unit 366 or on the absolute target address bus 346 provided fromthe IEU 104. Relative target addresses are those that can be calculatedby the execution PC control unit 366 directly. Absolute target addressesmust be generated by the IEU 104, since such target addresses aredependant on data contained in the IEU register file. The target addressis routed over the target address bus 384 to the prefetch PC controlunit 364 for use as a prefetch virtual address. In calculating therelative target address, an operand portion of the corresponding branchinstruction is also provided on the operand displacement portion of thebus 318 from the IDecode unit 262.

Another source of prefetch virtual addresses is the execution PC controlunit 366. A return address bus 352' is provided to transfer the currentIF₋₋ PC value (DPC) to the prefetch PC control unit 364. This address isutilized as a return address where an interrupt, trap or other controlflow instruction such as a call has occurred within the instructionstream. The prefetch PC control unit 364 is then free to prefetch a newinstruction stream. The PC control unit 362 receives an IEU returnsignal, via lines 350, from the IEU 104 once the corresponding interruptor trap handling routine or subroutine has been executed. In turn, thePC control unit 362 selects, via one of the PFPC control signals on line372 and based on an identification of the return instruction executed asprovided via lines 350, a register containing the current return virtualaddress. This address is then used to continue the prefetch operation bythe PC logic unit 270.

Finally, another source of prefetch virtual addresses is from thespecial register address and data bus 354. An address value, or at leasta base address value, calculated or loaded by the IEU 104 is transferredas data via the bus 354 to the prefetch PC control unit 364. The baseaddresses include the base addresses for the trap address table, a fasttrap table, and a base procedural instruction dispatch table. The bus354 also allows many of the registers in the prefetch and execution PCcontrol units 364, 366 to be read to allow corresponding aspects of thestate-of-the-machine to be manipulated through the IEU 104.

The execution PC control unit 366, subject to the control of the PCcontrol unit 362 is primarily responsible for calculating the currentIF₋₋ PC address value. In this role, the execution PC control unit 366responds to control signals provided by the PC control unit 362 on theExPC control lines 378 and increment/size control signals provided onthe control lines 380 to adjust the IF₋₋ PC address. These controlsignals are generated primarily in response to the IFIFO read controlsignal provided on line 342 and the PC increment/size value provided onthe control lines 344 from the IEU 104.

1) PF and ExPC Control/Data Unit Detail:

FIG. 4 provides a detailed block diagram of the prefetch and executionPC control units 364, 366. These units primarily consist of registers,incrementors and the like, selectors and adder blocks. Control formanaging the transfer of data between these blocks is provided by the PCControl Unit 362 via the PFPC control lines 372, the ExPC control lines378 and the Increment Control lines 374, 380. For purposes of clarity,those specific control lines are not shown in the block diagram of FIG.4. However, it should be understood that these control signals areprovided to the blocks shown as described herein.

Central to the prefetch PC control unit 364 is a prefetch selector (PF₋₋PC SEL) 390 that operates as a central selector of the current prefetchvirtual address. This current prefetch address is provided on the outputbus 392 from the prefetch selector to an incrementor unit 394 togenerate a next prefetch address. This next prefetch address is providedon the incrementor output bus 396 to a parallel array of registers MBUFPFnPC 398, TBUF PFnPC 400, and EBUF PFnPC 402. These registers 398, 400,402 effectively store the next instruction prefetch address. However, inaccordance with the preferred embodiment of the present invention,separate prefetch addresses are held for the MBUF 188, TBUF 190, andEBUF 192. The prefetch addresses, as stored by the MBUF, TBUF and EBUFPFnPC registers 398, 400, 402 are respectively provided by the addressbuses 404, 408, 410 to the prefetch selector 390. Thus, the PC controlunit 362 can direct an immediate switch of the prefetch instructionstream merely by directing the selection, by the prefetch selector 390,of another one of the prefetch registers 398, 400, 402. Once thataddress value has been incremented by the incrementor 394, if a nextinstruction set in the stream is to be prefetched, the value is returnedto the appropriate one of the prefetch registers 398, 400, 402. Anotherparallel array of registers, for simplicity shown as the single specialregister block 412, is provided to store a number of special addresses.The register block 412 includes a trap return address register, aprocedural instruction return address register, a procedural instructiondispatch table base address register, a trap routine dispatch table baseaddress register, and a fast trap routine table base address register.Under the control of the PC control unit 362, these return addressregisters may receive the current IF₋₋ PC execution address via the bus352'. The address values stored by the return and base address registerswithin the register block 412 may be both read and written independentlyby the IEU 104. The register are selected and values transferred via thespecial register address and data bus 354.

A selector within the special register block 412, controlled by the PCcontrol unit 362, allows the addresses stored by the registers of theregister block 412 to be put on the special register output bus 416 tothe prefetch selector 390. Return addresses are provided directly to theprefetch selector 390. Base address values are combined with the offsetvalue provided on the interrupt offset bus 373 from the interruptcontrol unit 363. Once sourced to the prefetch selector 390 via the bus373', a special address can be used as the initial address for a newprefetch instruction stream by thereafter continuing the incrementalloop of the address through the incrementor 394 and one of the prefetchregisters 398, 400, 402.

Another source of addresses to the prefetch selector 390 is an array ofregisters within the target address register block 414. The targetregisters within the block 414 provide for storage of, in the preferredembodiment, eight potential branch target addresses. These eight storagelocations logically correspond to the eight potentially executableinstructions held in the lowest two master registers 216, 224 of theIFIFO unit 264. Since any, and potentially all of the those instructionscould be conditional branch instructions, the target register block 414allows for their precalculated target addresses to be stored awaitinguse for fetching of a target instruction stream through the TBUF 190. Inparticular, if a conditional branch bias is set such that the PC ControlUnit 362 immediately begins prefetching of a target instruction stream,the target address is immediately fed through the target register block414 via the address bus 418 to the prefetch selector 390. Onceincremented by the incrementor 394, the address is stored back to theTBUF PFnPC 400 for use in subsequent prefetch operations of the targetinstruction stream. If additional branch instructions occur within thetarget instruction stream, the target addresses of such secondarybranches are calculated and stored in the target register array 414pending use upon resolution of the first conditional branch instruction.

A calculated target address as stored by the target register block 414,is transferred from a target address calculation unit within theexecution PC control unit 366 via the address lines 382 or from the IEU104 via the absolute target address bus 346.

The Address value transferred through the prefetch PF₋₋ PC selector 390is a full thirty-two bit virtual address value. The page size, in thepreferred embodiment of the present invention is fixed at 16 KBytes,corresponding to the maximum page offset address value 13:0!. Therefore,a VMU page translation is not required unless there is a change in thecurrent prefetch virtual page address 27:14!. A comparator in theprefetch selector 390 detects this circumstance. A VMU translationrequest signal (VMXLAT) is provided via line 372' to the PC control unit362 when there is a change in the virtual page address, either dueincrementing across a page boundary or a control flow branch to anotherpage address. In turn, the PC control unit 362 directs the placement ofthe VMU VMADDR address on lines 326, in addition to the CCU PADDR onlines 324, both via a buffer unit 420, and the appropriate controlsignals on the VMU control lines 326, 328, 330 to obtain a VMU virtualto physical page translation. Where a page translation is not required,the current physical page address 31:14! is maintained by a latch at theoutput of the VMU unit 108 on the bus 122.

The virtual address provided onto the bus 370 is incremented by theincrementor 394 in response to a signal provided on the incrementcontrol line 374. The incrementor 394 increments by a value representingan instruction set (four instructions or sixteen bytes) in order toselect a next instruction set. The low-order four bits of a prefetchaddress as provided to the CCU unit 106 are zero. Therefore the actualtarget address instruction in a first branch target instruction set maynot be located in the first instruction location. However, the low-orderfour bits of the address are provided to the PC control unit 362 toallow the proper first branch instruction location to be known by theIFU 102. The detection and handling, by returning the low order bits3:2! of a target address as the two-bit buffer address, to select theproper first instruction for execution in a non-aligned targetinstruction set, is performed only for the first prefetch of a newinstruction stream, i.e., any first non-sequential instruction setaddress in an instruction stream. The non-aligned relationship betweenthe address of the first instruction in an instruction set and theprefetch address used in prefetching the instruction set can and isthereafter ignored for the duration of the current sequentialinstruction stream.

The remainder of the functional blocks shown in FIG. 4 comprise theexecution PC control unit 366. In accordance with the preferredembodiment of the present invention, the execution PC control unit 366incorporates its own independently functioning program counterincrementor. Central to this function is an execution selector (DPC SEL)430. The address output by the execution selector 430, on the addressbus 352', is the present execution address (DPC) of the architecture100. This execution address is provided to an adder unit 434. Theincrement/size control signals provided on the lines 380 specify aninstruction increment value of from one to four that the adder unit 434adds to the address obtained from the selector 430. As the adder 432additionally performs an output latch function, the incremented nextexecution address is provided on the address lines 436 directly back tothe execution selector 430 for use in the next execution incrementcycle.

The initial execution address and all subsequent new stream addressesare obtained through a new stream register unit 438 via the addresslines 440. The new stream register unit 438 allows the new currentprefetch address, as provided on the PFPC address bus 370 from theprefetch selector 390 to be passed on to the address bus 440 directly orstored for subsequent use. That is, where the prefetch PC control unit364 determines to begin prefetching at a new virtual address, the newstream address is temporarily stored by the new stream register unit438. The PC control unit 362, by its participation in both the prefetchand execution increment cycles holds the new stream address in the newstream register 438 unit until the execution address has reached theprogram execution point corresponding to the control flow instructionthat instigated the new instruction stream. The new stream address isthen output from the new stream register unit 438 to the executionselector 430 to initiate the independent generation of executionaddresses in the new instruction stream.

In accordance with the preferred embodiments of the present invention,the new stream register unit 438 provides for the buffering of twocontrol flow instruction target addresses. By the immediate availabilityof the new stream address, there is essentially no latency in theswitching of the execution PC control unit 366 from the generation of acurrent sequence of execution addresses to a new stream sequence ofexecution addresses.

Finally, an IF₋₋ PC selector (IF₋₋ PC SEL) 442 is provided to ultimatelyissue the current IF₋₋ PC address on the address bus 352 to the IEU 104.The inputs to the IF₋₋ PC selector 442 are the output addresses obtainedfrom either the execution selector 430 or new stream register unit 438.In most instances, the IF₋₋ PC selector 442 is directed by the PCcontrol unit 362 to select the execution address output by the executionselector 430. However, in order to further reduce latency in switchingto a new virtual address used to initiate execution of a new instructionstream, the selected address provided from the new stream register unit438 can be bypassed via bus 440 directly to the IF₋₋ PC selector 442 forprovision as the current IF₋₋ PC execution address.

The execution PC control unit 366 is capable of calculating all relativebranch target addresses. The current execution point address and the newstream register unit 438 provided address are received by a control flowselector (CF₋₋ PC) 446 via the address buses 352', 440. Consequently,the PC control unit 362 has substantial flexibility in selecting theexact initial address from which to calculate a target address. Thisinitial, or base, address is provided via address bus 454 to a targetaddress ALU 450. A second input value to the target ALU 450 is providedfrom a control flow displacement calculation unit 452 via bus 458.Relative branch instructions, in accordance with the preferredarchitecture 100, incorporate a displacement value in the form of animmediate mode constant that specifies a relative new target address.The control flow displacement calculation unit 452 receives the operand:displacement value initially obtained via the IDecode unit operandoutput bus 318. Finally, an offset register value is provided to thetarget address ALU 450 via the lines 456. The offset register 448receives an offset value via the control lines 378' from the PC controlunit 362. The magnitude of the offset value is determined by the PCcontrol unit 362 based on the address offset between the base addressprovided on the address lines 454 and the address of the current branchinstruction for which the relative target address is being calculated.That is, the PC control unit 362, through its control of the IFIFOcontrol logic unit 272 tracks the number of instructions separating theinstruction at the current execution point address (requested by CP₋₋PC) and the instruction that is currently being processed by the IDecodeunit 262 and, therefore, being processed by the PC logic unit 270 todetermine the target address for that instruction.

Once the relative target address has been calculated by the targetaddress ALU 450, the target address is written into a corresponding oneof the target registers 414 via the address bus 382.

2) PC Control Algorithm Detail:

1. Main Instruction Stream Processing: MBUF PFnPC

1.1 the address of the next main flow prefetch instruction is stored inthe MBUF PFnPC.

1.2 in the absence of a control flow instruction, a 32 bit incrementoradjusts the address value in the MBUF PFnPC by sixteen bytes (×16) witheach prefetch cycle.

1.3 when an unconditional control flow instruction is IDecoded, allprefetched data fetched subsequent to the instruction set will beflushed and the MBUF PFnPC is loaded, through the target register unit,PF₋₋ PC selector and incrementor, with the new main instruction streamaddress. The new address is also stored in the new stream registers.

1.3.1 the target address of a relative unconditional control flow iscalculated by the IFU from register data maintained by the IFU and fromoperand data following the control flow instruction.

1.3.2 the target address of an absolute unconditional control flowinstruction is eventually calculated by the IEU from a registerreference, a base register value, and an index register value.

1.3.2.1 instruction prefetch cycling stalls until the target address isreturned by the IEU for absolute address control flow instruction;instruction execution cycling continues.

1.4 the address of the next main flow prefetch instruction set,resulting from an unconditional control flow instruction, is bypassedthrough the target address register unit, PF₋₋ PC selector andincrementor and routed for eventual storage in the MBUF PFnPC;prefetching continues at 1.2.

2. Procedural Instruction Stream Processing: EBUF PFnPC

2.1 a procedural instruction may be prefetched in the main or branchtarget instruction stream. If fetched in a target stream, stallprefetching of the procedural stream until the conditional control flowinstruction resolves and the procedural instruction is transferred tothe MBUF. This allows the TBUF to be used in handling of conditionalcontrol flows that occur in the procedural instruction stream.

2.1.1 a procedural instruction should not appear in a proceduralinstruction stream, i.e., procedural instructions should not be nested:a return from procedural instruction will return execution to the maininstruction flow. In order to allow nesting, an additional, dedicatedreturn from nested procedural instruction would be required. While thearchitecture can readily support such an instruction, the need for anested procedural instruction capability will not likely improve theperformance of the architecture.

2.1.2 in a main instruction stream, a procedural instruction streamthat, in turn, includes first and second conditional control flowinstruction containing instruction sets will stall prefetching withrespect to the second conditional control flow instruction set until anyconditional control flow instructions in the first such instruction setare resolved and the second conditional control flow instruction set hasbeen transferred to the MBUF.

2.2 procedural instructions provide a relative offset, included as animmediate mode operand field of the instruction, to identify theprocedural routine starting address:

2.2.1 the offset value provided by the procedural instruction iscombined with a value contained in a procedural base address (PBR)register maintained in the IFU. This PBR register is readable andwritable via the special address and data bus in response to theexecution of a special register move instruction.

2.3 when a-procedural instruction is encountered, the next maininstruction stream IF₋₋ PC address is stored in the uPC return addressregister and the procedure-in-progress bit in the processor statusregister (PSR) is set.

2.4 the starting address of the procedural stream is routed from the PBRregister (plus the procedural instruction operand offset value) to thePF₋₋ PC selector.

2.5 the starting address of the procedural stream is simultaneouslyprovided to the new stream register unit and to the incrementor forincrementing (×16); the incremented address is then stored in the EBUFPFnPC.

2.6 in the absence of a control flow instruction, a 32 bit incrementoradjusts address value (×16) in the EBUF PFnPC with each proceduralinstruction prefetch cycle.

2.7 when an unconditional control flow instruction is IDecoded, allprefetched data fetched subsequent to the branch instruction will beflushed and the EBUF PFnPC is loaded with the new procedural instructionstream address.

2.7.1 the target address of a relative unconditional control flowinstruction is calculated by the IFU from IFU maintained register dataand from the operand data provided within an immediate mode operandfield of the control flow instruction.

2.7.2 the target address of an absolute unconditional b ranch iscalculated by the IEU from a register reference, a base register value,and an index register value.

2.7.2.1 instruction prefetch cycling stalls until the target address isreturned by the IEU for absolute address branches; execution cyclingcontinues.

2.8 the address of the next procedural flow prefetch instruction set isstored in the EBUF PFnPC and prefetching continues at 1.2.

2.9 when a return from procedure instruction is IDecoded, prefetchingcontinues from the address stored in the uPC register, which is thenincremented (×16) and returned to the MBUF PFnPC register for subsequentprefetches.

3 Branch Instruction Stream Processing: TBUF PFnPC

3.1 when a conditional control flow instruction, occurring in a firstinstruction set in the MBUF instruction stream, is IDecoded, the targetaddress is determined by the IFU if the target address is relative tothe current address or by the IEU for absolute addresses.

3.2 for "branch taken bias":

3.2.1 if the branch is to an absolute address, stall instructionprefetch cycling until the target address is returned by the IEU;execution cycling continues.

3.2.2 load the TBUF PFnPC with the branch target address by transferthrough the PF₋₋ PC selector and incrementor.

3.2.3 target instruction stream instructions are prefetched into theTBUF and then routed into the IFIFO for subsequent execution; if theIFIFO and TBUF becomes full, stall prefetching.

3.2.4 the 32 bit incrementor adjusts (×16) the address value in the.TBUF PFnPC with each prefetch cycle.

3.2.5 stall the prefetch operation on IDecode of a conditional controlflow instruction, occurring in a second instruction set in the targetinstruction stream until the all conditional branch instructions in thefirst (primary) set are resolved (but go ahead and calculate therelative target address and store in target registers).

3.2.6 if conditional branch in the first instruction set resolves to"taken":

3.2.6.1 flush instruction sets following the first conditional flowinstruction set in the MBUF or EBUF, if the source of the branch was theEBUF instruction stream as determined from the procedure-in-progressbit.

3.2.6.2 transfer the TBUF PFnPC value to MBUF PFnPC or EBUF based on thestate of the procedure-in-progress bit.

3.2.6.3 transfer the prefetched TBUF instructions to the MBUF or EBUFbased on the state of procedure-in-progress bit.

3.2.6.4 if a second conditional branch instruction set has not beenIDecoded, continue MBUF or EBUF prefetching operations based on thestate of the procedure-in-progress bit.

3.2.6.5 if a second conditional branch instruction has been IDecoded,begin processing that instruction (go to step 3.3.1).

3.2.7 if the conditional control for instruction(s) in the firstconditional instruction set resolves to "not taken":

3.2.7.1 flush the IFIFO and IEU of instruction sets and instructionsfrom the target instruction stream.

3.2.7.2 continue MBUF or EBUF prefetching operations.

3.3 for "branch not taken bias":

3.3.1 stall prefetch of instructions into the MBUF; execution cyclingcontinues.

3.3.1.1 if the conditional control flow instruction in the firstconditional instruction set is relative, calculate the target addressand store in the target registers.

3.3.1.2 if the conditional control flow instructions in the firstconditional instruction set is absolute, wait for the IEU to calculatethe target address and return the address to the target registers.

3.3.1.3 stall the prefetch operation on IDecode of a conditional controlflow instruction in a second instruction set until the conditionalcontrol flow instruction(s) in the first conditional instruction setinstruction is resolved.

3.3.2 once the target address of the first conditional branch iscalculated, load into TBUF PFnPC and also begin prefetching instructionsinto the TBUF concurrent with execution of the main instruction stream.Target instruction sets are not loaded into the IFIFO (the branch targetinstructions are thus on hand when each conditional control flowinstruction in the first instruction set resolves).

3.3.3 if a conditional control flow instruction in the first setresolves to "taken":

3.3.3.1 flush the MBUF or EBUF, if the source of the branch was the EBUFinstruction stream, as determined from the state of theprocedure-in-progress bit, and the IFIFO and IEU of instructions fromthe main stream following the first conditional branch instruction set.

3.3.3.2 transfer the TBUF PFnPC value to MBUF PFnPC or EBUF, asdetermined from the state of the procedure-in-progress bit.

3.3.3.3 transfer the prefetched TBUF instructions to the MBUF or EBUF,as determined from the state of the procedure-in-progress bit.

3.3.3.4 continue MBUF or EBUF prefetching operations, as determined fromthe state of the procedure-in-progress bit.

3.3.4 if a conditional control flow instruction in the first setresolves to "not taken":

3.3.4.1 flush the TBUF of instruction sets from the target instructionstream.

3.3.4.2 if a second conditional branch instruction has not beenIDecoded, continue MBUF or EBUF, as determined from the state of theprocedure-in-progress bit, prefetching operations.

3.3.4.3 if a second conditional branch instruction has been IDecoded,begin processing that instruction (go to step 3.4.1).

4. Interrupts, Exceptions and Trap Instructions.

4.1 Traps generically include:

4.1.1 Hardware Interrupts.

4.1.1.1 asynchronously (external) occurring events, internal orexternal.

4.1.1.2 can occur at any time and persist.

4.1.1.3 serviced in priority order between atomic (ordinary)instructions and may suspend procedural instructions.

4.1.1.4 the starting address of an interrupt handler is determined asthe vector number offset into a predefined table of trap handler entrypoints.

4.1.2 Software Trap Instructions

4.1.2.1 synchronously (internal) occurring instructions.

4.1.2.2 a software instruction that executes as an exception.

4.1.2.3 the starting address of the trap handler is determined from thetrap number offset combined with a base address value stored in the TBRor FTB register.

4.1.3 Exceptions.

4.1.3.1 Events occurring synchronously with an instruction.

4.1.3.2 handled at the time the instruction is executed.

4.1.3.3 due to consequences of the exception, the excepted instructionand all subsequent executed instructions are cancelled.

4.1.3.4 the starting address of the exception handler is determined fromthe trap number offset into a predefined table of trap handler entrypoint.

4.2 Trap instruction stream operations occur in-line with the thencurrently executing instruction stream.

4.3 Traps may nest, provided the trap handling routine saves the xPCaddress prior to a next allowed trap--failure to do so will corrupt thestate of the machine if a trap occurs prior to completion of the currenttrap operation.

5. Trap Instruction Stream Processing: xPC.

5.1 when a trap is encountered:

5.1.1 if an asynchronous interrupt, the execution of the currentlyexecuting instruction(s) is suspended.

5.1.2 if a synchronous exception, the trap is processed upon executionof the excepted instruction.

5.2 when a trap is processed:

5.2.1 interrupts are disabled.

5.2.2 the current IF₋₋ PC address is stored in the xPC trap state returnaddress register.

5.2.3 the IFIFO and the MBUF prefetch buffers at and subsequent to theIF₋₋ PC address are flushed.

5.2.4 executed instructions at and subsequent to the address IF₋₋ PC andthe results of those instructions are flushed from the IEU.

5.2.5 the MBUF PFnPC is loaded with the address of the trap handlerroutine.

5.2.5.1 source of a trap address either the TBR or FTB register,depending on the type of trap as determined by the trap number, whichare provided in the set of special registers.

5.2.6 instructions are prefetched and dropped into the IFIFO forexecution in a normal manner.

5.2.7 the instructions of the trap routine are then executed.

5.2.7.1 the trap handling routine may provide for the xPC address to besaved to a predefined location and interrupts re-enabled; the xPCregister is read/write via a special register move instruction and thespecial register address and data bus.

5.2.8 the trap state must be exited by the execution of a return fromtrap instruction.

5.2.8.1 if prior saved, the xPC address must be restored from itspredefined location before executing the return from trap instruction.

5.3 when a return from trap is executed:

5.3.1 interrupts are enabled.

5.3.2 the xPC address is returned to the current instruction streamregister MBUF or EBUF PFnPC, as determined from the state of theprocedure-in-progress bit, and prefetching continues from that address.

5.3.3 the xPC address is restored to the IF₋₋ PC register through thenew stream register.

E) Interrupt and Exception Handling:

1) Overview:

Interrupts and exceptions will be processed, as long as they areenabled, regardless of whether the processor is executing from the maininstruction stream or a procedural instruction stream. Interrupts andexceptions are serviced in priority order, and persist until cleared.The starting address of a trap handler is determined as the vectornumber offset into a predefined table of trap handler addresses asdescribed below.

Interrupts and exceptions are of two basic types in the presentembodiment, those which occur synchronously with particular instructionsin the instruction stream, and those which occur asynchronously withparticular instructions in the instruction stream. The terms interrupt,exception, trap and fault are used interchangeably herein. Asynchronousinterrupts are generated by hardware, either on-chip or off-chip, whichdoes not operate synchronously with the instruction stream. For example,interrupts generated by an on-chip timer/counter are asynchronous, asare hardware interrupts and non-maskable interrupts (NMI) provided fromoff-chip. When an asynchronous interrupt occurs, the processor contextis frozen, all traps are disabled, certain processor status informationis stored, and the processor vectors to an interrupt handlercorresponding to the particular interrupt received. After the interrupthandler completes its processing, program execution continues with theinstruction following the last completed instruction in the stream whichwas executing when the interrupt occurred.

Synchronous exceptions are those that occur synchronously withinstructions in the instruction stream. These exceptions occur inrelation to particular instructions, and are held until the relevantinstruction is to be executed. In the preferred embodiments, synchronousexceptions arise during prefetch, during instruction decode, or duringinstruction execution. Prefetch exceptions include, for example, TLBmiss or other VMU exceptions. Decode exceptions arise, for example, ifthe instruction being decoded is an illegal instruction or does notmatch the current privilege level of the processor. Execution exceptionsarise due to arithmetic errors, for example, such as divide by zero.Whenever these exceptions occur, the preferred embodiments maintain themin correspondence with the particular instruction which caused theexception, until the time at which that instruction is to be retired. Atthat time, all prior completed instructions are retired, any tentativeresults from the instruction which caused the exception are flushed, asare the tentative results of any following tentatively executedinstructions. Control is then transferred to an exception handlercorresponding to the highest priority exception which occurred for thatinstruction.

Software trap instructions are detected at the IDecode stage by CF₋₋ DET274 (FIG. 2) and are handled similarly to both unconditional callinstructions and other synchronous traps. That is, a target address iscalculated and prefetch continues to the then-current prefetch queue(EBUF or MBUF). At the same time, the exception is also noted incorrespondence with the instruction and is handled when the instructionis to be retired. All other types of synchronous exceptions are merelynoted and accumulated in correspondence with the particular instructionwhich caused it and are handled at execution time.

2) Asynchronous Interrupts:

Asynchronous interrupts are signaled to the PC logic unit 270 overinterrupt lines 292. As shown in FIG. 3, these lines are provided to theinterrupt logic unit 363 in the PC logic unit 270, and comprise an NMIline, an IRQ line and a set of interrupt level lines (LVL). The NMI linesignals a non-maskable interrupt, and derives from an external source.It is the highest priority interrupt except for hardware reset. The IRQline also derives from an external source, and indicates when anexternal device is requesting a hardware interrupt. The preferredembodiments permit up to 32 user-defined externally supplied hardwareinterrupts and the particular external device requesting the interruptprovides the number of the interrupt (0-31) on the interrupt level lines(LVL). The memory error line is activated by the MCU 110 to signalvarious kinds of memory errors. Other asynchronous interrupt lines (notshown) are also provided to the interrupt logic unit 363, includinglines for requesting a timer/counter interrupt, a memory I/O errorinterrupt, a machine check interrupt and a performance monitorinterrupt. Each of the asynchronous interrupts, as well as thesynchronous exceptions described below, have a correspondingpredetermined trap number associated with them, 32 of these trap numbersbeing associated with the 32 available hardware interrupt levels. Atable of these trap numbers is maintained in the interrupt logic unit363. The higher the trap number, in general, the higher the priority ofthe trap.

When one of the asynchronous interrupts is signaled to the interruptlogic unit 363, the interrupt control unit 363 sends out an interruptrequest to the IEU 104 over INT REQ/ACK lines 340. Interrupt controlunit 363 also sends a suspend prefetch signal to PC control unit 362over lines 343, causing the PC control unit 262 to stop prefetchinginstructions. The IEU 104 either cancels all then-executinginstructions, and flushing all tentative results, or it may allow someor all instructions to complete. In the preferred embodiments, anythen-executing instructions are canceled, thereby permitting the fastestresponse to asynchronous interrupts. In any event, the DPC in theexecution PC control unit 366 is updated to correspond to the lastinstruction which has been completed and retired, before the IEU 104acknowledges the interrupt. All other prefetched instructions in MBUF,EBUF, TBUF and IFIFO 264 are also cancelled.

Only when the IEU 104 is ready to receive instructions from an interrupthandler does it send an interrupt acknowledge signal on INT REQ/ACKlines 340 back to the interrupt control unit 363. The interrupt controlunit 363 then dispatches to the appropriate trap handler as describedbelow.

3) Synchronous Exceptions:

For synchronous exceptions, the interrupt control unit 363 maintains aset of four internal exception bits (not shown) for each instructionset, one bit corresponding to each instruction in the set. The interruptcontrol unit 363 also maintains an indication of the particular trapnumbers, if any detected for each instruction.

If the VMU signals a TLB miss or another VMU exception while aparticular instruction set is being prefetched, this information istransmitted to the PC logic unit 270, and in particular to the interruptcontrol unit 363, over the VMU control lines 332 and 334. When theinterrupt control unit 363 receives such a signal, it signals the PCcontrol unit 362 over line 34.3 to suspend further prefetches. At thesame time, the interrupt control unit 363 sets the VM₋₋ Miss or VM₋₋Excp bit, as appropriate, associated the prefetch buffer to which theinstruction set was destined. The interrupt control unit 363 then setsall four internal exception indicator bits corresponding to thatinstruction set, since none of the instructions in the set are valid,and stores the trap number for the particular exception received incorrespondence with each of the four instructions in the faultyinstruction set. The shifting and executing of instructions prior to thefaulty instruction set then continues as usual until the faulty setreaches the lowest level in the IFIFO 264.

Similarly, if other synchronous exceptions are detected during theshifting of an instruction through the prefetch buffers 260, the IDecodeunit 262 or the IFIFO 264, this information is also transmitted to theinterrupt control unit 363 which sets the internal exception indicatorbit corresponding to the instruction generating the exception and storesthe trap number in correspondence with that exception. As with prefetchsynchronous exceptions, the shifting and executing of instructions priorto the faulty instruction then continues as usual until the faulty setreaches the lowest level in the IFIFO 264.

In the preferred embodiments, the only type of exception which isdetected during the shifting of an instruction through the prefetchbuffers 260, the IDecode unit 262 or the IFIFO 264 is a software trapinstruction. Software trap instructions are detected at the IDecodestage by CF₋₋ DET unit 274. While in some embodiments other forms ofsynchronous exceptions may be detected in the IDecode unit 262, it ispreferred that the detection of any other synchronous exceptions waituntil the instruction reaches the execution unit 104. This avoids thepossibility that certain exceptions, such as arising from the handlingof privileged instruction, might be signaled on the basis of a processorstate which could change before the effective in-order-execution of theinstruction. Exceptions which do not depend on the processor state, suchas illegal instruction, could be detected in the IDecode stage, buthardware is minimized if the sane logic detects all pre-executionsynchronous exceptions (apart from VMU exceptions). Nor is there anytime penalty imposed by waiting until instructions reach the executionunit 104, since the handling of such exceptions is rarely time critical.

As mentioned, software trap instructions are detected at the IDecodestage by the CF₋₋ DET unit 274. The internal exception indicator bitcorresponding to that instruction in the interrupt logic unit 363 is setand the software trap number, which can be any number from 0 to 127 andwhich is specified in an immediate mode operand field of the softwaretrap instruction, is stored in correspondence with the trap instruction.

Unlike prefetch synchronous exceptions, however, since software trapsare treated as both a control flow instruction and as a synchronousexception, the interrupt control unit 363 does not signal PC controlunit 362 to suspend prefetches when a software trap instruction isdetected. Rather, at the same time the instruction is shifting throughthe IFIFO 264, the IFU 102 prefetches they trap handler into the MBUFinstruction stream buffer.

When an instruction set reaches the lowest level of the IFIFO 264, theinterrupt logic unit 363 transmits the exception indicator bits for thatinstruction set as a 4-bit vector to the IEU 104 over the SYNCH₋₋ INT₋₋INFO lines 341 to indicate which, if any, of the instructions in theinstruction set have already been determined to be the source of asynchronous exception. The IEU 104 does not respond immediately, butrather permits all the instructions in the instruction set to bescheduled in the normal course. Further exceptions, such as integerarithmetic exceptions, may be generated during execution. Exceptionswhich depend on the current state of the machine, such as due to theexecution of a privileged instruction, are also detected at this time,and in order to ensure that the state of the machine is current withrespect to all previous instructions in the instruction stream, allinstructions which have a possibility of affecting the PSR (such asspecial move and returns from trap instructions) are forced to executein order. Only when an instruction that is the source of a synchronousexception of any sort is about to be retired, is the occurrence of theexception signaled to the interrupt logic unit 363.

The IEU 104 retires all instructions which have been tentativelyexecuted and which occur in the instruction stream prior to the firstinstruction which has a synchronous exception, and flushes the tentativeresults from any tentatively executed instructions which occursubsequently in the instruction stream. The particular instruction thatcaused the exception is also flushed since that instruction willtypically be re-executed executed upon return from trap. The IF₋₋ PC inthe execution PC control unit 366 is then updated to correspond to thelast instruction actually retired, and the before any exception issignaled to the interrupt control unit 363.

When the instruction that is the source of an exception is retired, theIEU 104 returns to the interrupt logic unit 363, over the SYNCH₋₋ INT₋₋INFO lines 341, both a new 4-bit vector indicating which, if any,instructions in the retiring instruction set (register 224) had asynchronous exception, as well as information indicating the source ofthe first exception in the instruction set. The information in the 4-bitexception vector returned by IEU 104 is an accumulation of the 4-bitexception vectors provided to the IEU 104 by the interrupt logic unit363, as well as exceptions generated in the IEU 104. The remainder ofthe information returned from the IEU 104 to interrupt control unit 363,together with any information already stored in the interrupt controlunit 363 due to exceptions detected on prefetch or IDecode, issufficient for the interrupt control unit 363 to determine the nature ofthe highest priority synchronous exception and its trap number.

4) Handler Dispatch and Return:

After an interrupt acknowledge signal is received over lines 340 fromthe IEU, or after a non-zero exception vector is received over lines341, the current DPC is temporarily stored as a return address in an xPCregister, which is one of the special registers 412 (FIG. 4). Thecurrent processor status register (PSR) is also stored in a previous PSR(PPSR) register, and the current compare state register (CSR) is savedin a prior compare state register (PCSR) in the special registers 412.

The address of a trap handler is calculated as a trap base registeraddress plus an offset. The PC logic unit 270 maintains two baseregisters for traps, both of which are part of the special registers 412(FIG. 4), and both of which are initialized by special move instructionsexecuted previously. For most traps, the base register used to calculatethe address of the handler is a trap base register TBR.

The interrupt control unit 363 determines the highest priority interruptor exception currently pending and, through a look-up table, determinesthe trap number associated therewith. This is provided over a set ofINT₋₋ OFFSET lines 373 to the prefetch PC control unit 364 as an offsetto the selected base register. Advantageously, the vector address iscalculated by merely concatenating the offset bits as low-order bits tothe higher order bits obtained from the TBR register. This avoids anyneed for the delays of an adder. (As used herein, the 2' bit is referredto as the i'th order bit.) For example, if traps are numbered from 0through 255, represented as an 8 bit value, the handler address may becalculated by concatenating the 8 bit trap number to the end of a 22-bitTBR stored value. Two low-order zero bits may be appended to the trapnumber to ensure that the trap handler address always occurs on a wordboundary. The concatenated handler address thus constructed is providedas one of the inputs, 373; to the prefetch selector PF₋₋ PC Sel 390(FIG. 4), and is selected as the next address from which instructionsare to be prefetched.

The vector handler address for traps using the TBR register are all onlyone word apart. Thus, the instruction at the trap handler address mustbe a preliminary branch instruction to a longer trap handling routine.Certain traps require very careful handling, however, to preventdegradation of system performance. TLB traps, for example, must beexecuted very quickly. For this reason, the preferred embodimentsinclude a fast trap mechanism designed to allow the calling of smalltrap handlers without the cost of this preliminary branch. In addition,fast trap handlers can be located independently in memory, in on-chipROM, for example, to eliminate memory system penalties associated withRAM locations.

In the preferred embodiment, the only traps which result in fast trapsare the VMU exceptions mentioned above. Fast traps are numberedseparately from other traps, and have a range from 0 to 7. However, theyhave the same priority as MMU exceptions. When the interrupt controlunit 363 recognizes a fast trap as the highest priority trap thenpending, it causes a fast trap base register (FTB) to be selected fromthe special registers 412 and provided on the lines 416 to be combinedwith the trap offset. The resulting vector address provided to theprefetch selector PF₋₋ PC Sel 390, via lines 373', is then aconcatenation of the high-order 22 bits from the FTB register, followedby three bits representing the fast trap number, followed by seven bitsof 0's. Thus, each fast trap address is 128 bytes, or 32 words apart.When called, the processor branches to the starting word and may executeprograms within the block or branch out of it. Execution of smallprograms, such as standard TLB handling routines which may beimplemented in 32 instructions or less, is faster than ordinary trapsbecause the preliminary branch to the actual exception handling routineis obviated.

It should be noted that although all instructions have the same lengthof 4 bytes (i.e., occupy four address locations) in the preferredembodiments, it should be noted that the fast trap mechanism is alsouseful in microprocessors whose instructions are variable in length. Inthis case, it will be appreciated that the fast trap vector addresses beseparated by enough space to accommodate at least two of the shortestinstructions available on the microprocessor, and preferably about 32average-sized instructions. Certainly, if the microprocessor includes areturn from trap instruction, the vector addresses should be separatedby at least enough space to permit that instruction to be preceded by atleast one other instruction in the handler.

Also on dispatch to a trap handler, the processor enters both a kernelmode and an interrupted state. Concurrently, a copy of the compare stateregister (CSR) is placed in the prior carry state register (PCSR) and acopy of the PSR is stored in the prior PSR (PPSR) register. The kerneland interrupted states modes are represented by bits in the processorstatus register (PSR). Whenever the interrupted₋₋ state bit in thecurrent PSR is set, the shadow registers or trap registers RT 24!through RT 31!, as described above and as shown in FIG. 7B, becomevisible. The interrupt handler may switch out of kernel mode merely bywriting a new mode into the PSR, but the only way to leave theinterrupted state is by executing a return from trap (RTT) instruction.

When the IEU 104 executes an RTT instruction, PCSR is restored to CSRregister and PPSR register is restored to the PSR register, therebyautomatically clearing the interrupt₋₋ state bit in the PSR register.The PF₋₋ PC SEL selector 390 also selects special register xPC in thespecial register set 412 as the next address from which to prefetch. xPCis restored to either the MBUF PFnPC or the EBUF PFnPC as appropriate,via incrementor 394 and bus 396. The decision as to whether to restorexPC into the EBUF or MBUF PFnPC is made according to the "procedure₋₋in₋₋ progress" bit of the PSR, once restored.

It should be noted that the processor does not use the same specialregister xPC to store the return address for both traps and proceduralinstructions. The return address for a trap is stored in the specialregister xPC, as mentioned, but the address to return to after aprocedural instruction is stored in a different special register, uPC.Thus, the interrupted state remains available even while the processoris executing an emulation stream invoked by a procedural instruction. Onthe other hand, exception handling routines should not include anyprocedural instructions since there is no special register to store anaddress for return to the exception handler after the emulation streamis complete.

5) Nesting:

Although certain processor status information is automatically backed upon dispatch to a trap handler, in particular CSR, PSR, the return PC,and in a sense the "A" register set ra 24! through ra 31!, other contextinformation is not protected. For example, the contents of a floatingpoint status register (FSR) is not automatically backed up. If a traphandler intends to alter these registers, it must perform its ownbackup.

Because of the limited backup which is performed automatically on adispatch to a trap handler, nesting of traps is not automaticallypermitted. A trap handler should back up any desired registers, clearany interrupt condition, read any information necessary for handling thetrap from the system registers and process it as appropriate. Interruptsare automatically disabled upon dispatch to the trap handler. Afterprocessing, the handler can then restore the backed up registers,re-enable interrupts and execute the RTT instruction to return from theinterrupt.

If nested traps are to be allowed, the trap handler should be dividedinto first and second portions. In the first portion, while interruptsare disabled, the xPC should be copied, using a special register moveinstruction, and pushed onto the stack maintained by the trap handler.The address of the beginning of the second portion of the trap handlershould then be moved using the special register move instruction intothe xPC, and a return from trap instruction (RTT) executed. The RTTremoves the interrupted state (via the restoration of PPSR into PSR) andtransfers control to the address in the xPC, which now contains theaddress of the second portion of the handler. The second portion mayenable interrupts at this point and continue to process the exception inan interruptable mode. It should be noted that the shadow registers RT24! through RT 31! are visible only in the first portion of thishandler, and not in the second portion. Thus, in the second portion, thehandler should preserve any of the "A" register values where theseregister values are likely to be altered by the handler. When the traphandling procedure is finished, it should restore all backed upregisters, pop the original xPC off the trap handler stack and move itback into the xPC special register using a special register moveinstruction, and execute another RTT. This returns control to theappropriate instruction in the main or emulation instruction stream.

6) List of Traps:

The following Table I sets forth the trap numbers, priorities andhandling modes of traps which are recognized in the preferredembodiments:

                  TABLE I    ______________________________________           Handling Asynch/    Trap # Mode     Synch   Trap Name    ______________________________________    0-127  normal   Synch   Trap instruction    128    normal   Synch   FP exception    129    normal   Synch   Integer arithmetic exceptions    130    normal   Synch   MMU (except TLB miss or modified)    135    normal   Synch   Unaligned memory address    136    normal   Synch   Illegal instruction    137    normal   Synch   Privileged instruction    138    normal   Synch   Debug exception    144    normal   Asynch  Performance monitor    145    normal   Asynch  Timer/Counter    146    normal   Asynch  Memory I/O error    160-191           normal   Asynch  Hardware interrupt    192-253           reserved    254    normal   Asynch  Machine check    255    normal   Asynch  NMI    0      fast trap                    Synch   Fast MMU TLB miss    1      fast trap                    Synch   Fast MMU TLB modified    2-3    fast trap                    Synch   Fast MMU (reserved)    4-7    fast trap                    Synch   Fast (reserved)    ______________________________________

III. Instruction Execution Unit

The combined control and data path portions of IEU 104 are shown in FIG.5. The primary data path begins with the instruction/operand data bus124 from the IFU 102. As a data bus, immediate operands are provided toan operand alignment unit 470 and passed on to a register file (REGARRAY) 472. Register data is provided from the register file 472 througha bypass unit 474, via a register file output bus 476, to a parallelarray of functional computing elements (FU_(0-n)) 478_(0-n), via adistribution bus 480. Data generated by the functional units 478_(0-n)is provided back to the bypass unit 474 or the register array 472, orboth, via an output bus 482.

A load/store unit 484 completes the data path portion of the IEU 104.The load/store unit 484 is responsible for managing the transfer of databetween the IEU 104 and CCU 106. Specifically, load data obtained fromthe data cache 134 of the CCU 106 is transferred by the load/store unit484 to an input of the register array 472 via a load data bus 486. Datato be stored to the data cache 134 of the CCU 106 is received from thefunctional unit distribution bus 480.

The control path portion of the IEU 104 is responsible for issuing,managing, and completing the processing of information through the IEUdata path. In the preferred embodiments of the present invention the IEUcontrol path is capable of managing the concurrent execution of multipleinstructions and the IEU data path provides for multiple independentdata transfers between essentially all data path elements of the IEU104. The IEU control path operates in response to instructions receivedvia the instruction/operand bus 124. Specifically, instruction sets arereceived by the EDecode unit 490. In the preferred embodiments of thepresent invention., the EDecode 490 receives and decodes bothinstruction sets held by the IFIFO master registers 216, 224. Theresults of the decoding of all eight instructions is variously providedto a carry checker (CRY CHKR) unit 492, dependency checker (DEP CHKR)unit 494, register renaming unit (REG RENAME) 496, instruction issuer(ISSUER) unit 498 and retirement control unit (RETIRE CTL) 500.

The carry checker unit 492 receives decoded information about the eightpending instructions from the EDecode unit 490 via control lines 502.The function of the carry checker 492 is to identify those ones of thepending instructions that either affect the carry bit of the processorstatus word or are dependent on the state of the carry bit. This controlinformation is provided via control lines 504 to the instruction issuerunit 498.

Decoded information identifying the registers of the register file 472that are used by the eight pending instructions as provided directly tothe register renaming unit 496 via control lines 506. This informationis also provided to the dependency checker unit 494. The function of thedependency checker unit 494 is to determine which of the pendinginstructions reference registers as the destination for data and whichinstructions, if any, are dependant on any of those destinationregisters. Those instructions that have register dependencies areidentified by control signals provided via the control lines 508 to theregister rename unit 496.

Finally, the EDecode unit 490 provides control information identifyingthe particular nature and function of each of the eight pendinginstructions to the instruction issuer unit 498 via control lines 510.The issuer unit 498 is responsible for determining the data pathresources, particularly of the availability of particular functionalunits, for the execution of pending instructions. In accordance with thepreferred embodiments of the architecture 100, instruction issuer unit498 allows for the out-of-order execution of any of the eight pendinginstructions subject to the availability of data path resources andcarry and register dependency constraints. The register rename unit 496provides the instruction issuing unit 498 with a bit map, via controllines 512 of those instructions that are suitably unconstrained to allowexecution. Instructions that have already been executed (done) and thosewith register or carry dependencies are logically removed from the bitmap.

Depending on the availability of required functional units 478_(0-n) theinstruction issuer unit 498 may initiate the execution of multipleinstructions during each system clock cycle. The status of thefunctional units 478_(0-n) are provided via a status bus 514 to theinstruction issuer unit 498. Control signals for initiating, andsubsequently managing the execution of instructions are provided by theinstruction issuer unit 498 on the control lines 516 to the registerrename unit 496 and selectively to the functional units 478_(0-n). Inresponse, the register rename unit 496 provides register selectionsignals on a register file access control bus 518. The specificregisters enabled via the control signals provided on the bus 518 aredetermined by the selection of the instruction being executed and by thedetermination by the register rename unit 496 of the registersreferenced by that particular instruction.

A bypass control unit (BYPASS CTL) 520 generally controls the operationof the bypass data routing unit 474 via control signals on control lines524. The bypass control unit 520 monitors the status of each of thefunctional units 478_(0-n) and, in conjunction with the registerreferences provided from the register rename unit 496 via control lines522, determines whether data is to be routed from the register file 472to the functional units 478_(0-n) or whether data being produced by thefunctional units 478_(0-n) can be immediately routed via the bypass unit474 to the functional unit distribution bus 480 for use in the executionof a newly issued instruction selected by the instruction issuer unit498. In either case, the instruction issuer unit 498 directly controlsthe routing of data from the distribution bus 480 to the functionalunits 478_(0-n) by selectively enabling specific register data to eachof the functional units 478_(0-n).

The remaining units of the IEU control path include a retirement controlunit 500, a control flow control (CF CTl) unit 528, and a done control(DONE CTL) unit 540. The retirement control unit 500 operates to void orconfirm the execution of out-of-order executed instructions. Where aninstruction has been executed out-of-order, that instruction can beconfirmed or retired once all prior instructions have also been retired.Based on an identification of which of the current set of eight pendinginstructions have been executed provided on the control lines 532, theretirement control unit 500 provides control signals on control lines534 coupled to the bus 518 to effectively confirm the result data storedby the register array 472 as the result of the prior execution of anout-of-order executed instruction.

The retirement control unit 500 provides the PC increment/size controlsignals on control lines 344 to the IFU 102 as it retires eachinstruction. Since multiple instructions may be executed out-of-order,and therefore ready for simultaneous retirement, the retirement controlunit 500 determines a size value based on the number of instructionssimultaneously retired. Finally, where all instructions of the IFIFOmaster register 224 have been executed and retired, the retirementcontrol unit 500 provides the IFIFO read control signal on the controlline 342 to the IFU 102 to initiate an IFIFO unit 264 shift operation,thereby providing the EDecode unit 490 with an additional fourinstructions as instructions pending execution.

The control flow control unit 528 performs the somewhat more specificfunction of detecting the logical branch result of each conditionalbranch instruction. The control flow control unit 528 receives an 8 bitvector identification of the currently pending conditional branchinstructions from the EDecode unit 490 via the control lines 510. An 8bit vector instruction done control signal is similarly received via thecontrol lines 532 or 542 from the done control unit 540. This donecontrol signal allows the control flow control unit 528 to identify whena conditional branch instruction is done at least to a point sufficientto determine a conditional control flow status. The control flow statusresult for the pending conditional branch instructions are stored by thecontrol flow control unit 528 as they are executed. The data necessaryto determine the conditional control flow instruction outcome isobtained from temporary status registers in the register array 472 viathe control lines 530. As each conditional control flow instruction isexecuted, the control flow control unit provides a new control flowresult signal on the control lines 348 to the IFU 102. This control flowresult signal preferably includes two 8 bit vectors defining whether thestatus results, by respective bit position, of the eight potentiallypending control flow instruction are known and the corresponding statusresult states, also given by bit position correspondence.

Lastly, the done control unit 540 is provided to monitor the operationalexecution state of each of the functional units 478_(0-n). As any of thefunctional units 478_(0-n) signal completion of an instruction executionoperation, the done control unit 540 provides a corresponding donecontrol signal on the control lines 542 to alert the register renameunit 496, instruction issuer unit 498, retirement control unit 500 andbypass control unit 520.

The parallel array arrangement of the functional units 478_(0-n)enhances the control consistency of the IEU 104. The particular natureof the individual functional units 478_(0-n) must be known by theinstruction issuer unit 498 in order for instructions to be properlyrecognized and scheduled for execution. The functional units 478_(0-n)are responsible for determining and implementing their specific controlflow operation necessary to perform their requisite function. Thus,other than the instruction issuer 498, none of the IEU control unitsneed to have independent knowledge of the control flow processing of aninstruction. Together, the instruction issuer unit 498 and thefunctional units 478_(0-n) provide the necessary control signalprompting of the functions to be performed by the remaining control flowmanaging units 496, 500, 520, 528, 540. Thus, alteration in theparticular control flow operation of a functional unit 478_(0-n) doesnot impact, the control operation of the IEU 104. Further, thefunctional augmentation of an existing functional unit 478_(0-n) andeven the addition of one or more new functional units 478_(0-n), such asan extended precision floating point multiplier and extended precisionfloating point ALU, a fast fourier computation functional unit, and atrigonometric computational unit, require only minor modification of theinstruction issuer unit 498. The required modifications must provide forrecognition of the particular instruction, based on the correspondinginstruction field isolated by the EDecode unit 490, a correlation of theinstruction to the required functional unit 478_(0-n). Control over theselection of register date, routing of data, instruction completion andretirement remain consistent with the handling of all other instructionsexecuted with respect to all other ones of the functional units478_(0-n).

A) IEU Data Path Detail:

The central element of the IEU data path is the register file 472.Within the IEU data path, however, the present invention provides for anumber of parallel data paths optimized generally for specificfunctions. The two principal data paths are integer and floating point.Within each parallel data path, a portion of the register file 472 isprovided to support the data manipulations occurring within that datapath

1) Register File Detail:

The preferred generic architecture of a data path register file is shownin FIG. 6A. The data path register file 550 includes a temporary buffer552, a register file array 564, an input selector 559, and an outputselector 556. Data ultimately destined for the register array 564 istypically first received by the temporary buffer 552 through a combineddata input bus 558'. That is, all data directed to the data pathregister file 550 is multiplexed by the input selector 559 from a numberof input buses 558, preferably two, onto the input bus 558'. Registerselect and enable control signals provided on the control bus 518 selectthe register location for the received data within the temporary buffer552. On retirement of an instruction that produced data stored in thetemporary buffer, control signals again provided on the control bus 518enable the transfer of the data from the temporary buffer 552 to alogically corresponding register within the register file array 564 viathe data bus 560. However, prior to retirement of the instruction, datastored in the registers of the temporary buffer 552 may be utilized inthe execution of subsequent instructions by routing the temporary bufferstored data to the output data selector 556 via a bypass portion of thedata bus 560. The selector 556, controlled by a control signal providedvia the control bus 518 selects between data provided from the registersof the temporary buffer 552 and of the register file array 564. Theresulting data is provided on the register file output bus 563. Also,where an executing instruction will be retired on completion, i.e., theinstruction has been executed in-order, the input selector 559 can bedirected to route the result data directly to the register array 554 viabypass extension 558".

In accordance with the preferred embodiments of the present invention,each data path register file 550 permits two simultaneous registeroperations to occur. Thus, the input bus 558 provides for two fullregister width data values to be written to the temporary buffer 552.Internally, the temporary buffer 552 provides a multiplexer arraypermitting the simultaneous routing of the input data to any tworegisters within the temporary buffer 552. Similarly, internalmultiplexers allow any five registers of the temporary buffer 552 to beselected to output data onto the bus 560. The register file array 564likewise includes input and output multiplexers allowing two registersto be selected to receive, on bus 560, or five to source, via bus 562,respective data simultaneously. Finally, the register file outputselector 556 is preferably implemented to allow any five of the tenregister data values received via the buses 560, 562 to besimultaneously output on the register file output bus 563.

The register set within the temporary buffer is generally shown in FIG.6B. The register set 552' consists of eight single word (32 bit)registers I0RD, I1RD . . . I7RD. The register set 552' may also be usedas a set of four double word registers I0RD, I0RD+1 (I0RD4), I1RD,I1RD+1 (I3RD) . . . I3RD, I3RD+1 (I7RD).

In accordance with the present invention, rather than provide duplicateregisters for each of the registers within the register file array 564,the registers in the temporary buffer register set 552 are referenced bythe register rename unit 496 based on the relative location of therespective instructions within the two IFIFO master registers 216, 224.Each instruction implemented by the architecture 100 may reference foroutput up to two registers, or one double word register, for thedestination of data produced by the execution of the instruction.Typically, an instruction will reference only a single output register.Thus,. for an instruction two (I₂) of the eight pending instructions,positionally identified as shown in FIG. 6C and that references asingle, output register, the data destination register I2RD will beselected to receive data produced by the execution of the instruction.Where the data produced by the instruction I₂ is used by a subsequentinstruction, for example, I₅, the data stored in the I2RD register willbe transferred out via the bus 560 and the resultant data stored back tothe temporary buffer 552 into the register identified as I5RD. Notably,instruction I₅ is dependent on instruction I₂ Instruction I₅ cannot beexecuted until the result data from I₂ is available. However, as can beseen, instruction I₅ can execute prior to the retirement of instructionI₂ by obtaining its required input data from the instruction I₂ datalocation of the temporary buffer 552'.

Finally, as instruction I₂ is retired, the data from the register I2RDis written to the register location within the register file array 564as determined by the logical position of the instruction at the point ofretirement. That is, the retirement control unit 500 determines theaddress of the destination registers in the register file array from theregister reference field data provided from the EDecode unit 490 on thecontrol lines 510. Once instructions I₂ have been retired, the values inI4RD-I7RD are shifted into I0RD-I3RD simultaneous with a shift of theIFIFO unit 264.

A complication arises where instruction I₂ provides a double word resultvalue. In accordance with a preferred embodiment of the presentinvention, a combination of locations I2RD and I6RD is used to store thedata resulting from instruction I₂ until that instruction is retired orotherwise cancelled. In the preferred embodiment, execution ofinstructions I₄₁₄ 7 are held where a double word output reference by anyof the instructions I₀₋₃ is detected by the register rename unit 496.This allows the entire temporary buffer 552' to be used as a single bankof double word registers. Once instructions I₀₋₃ have been retired, thetemporary buffer 552' can again be used as two banks of single wordregisters. Further, the execution of any instruction I₄₋₇ is held wherea double word output register is required until the instruction has beenshifted into a corresponding I₀₋₃ location.

The logical organization of the register file array 564 is shown inFIGS. 7A and B. In accordance with the preferred embodiments of thepresent invention, the register file array 564 for the integer data pathconsists of 40 32-bit wide registers. This set of registers,constituting a register set "A", is organized as a base register set ra0 . . . 23! 565, a top set of general purpose registers ra 24 . . . 31!566, and a shadow register set of eight general purpose trap registersrt 24 . . . 31!. In normal operation, the general purpose registers ra 0. . . 31! 565, 566 constitutes the active "A" register set of theregister file array for the integer data path.

As shown in FIG. 7B the trap registers rt 24 . . . 31! 567 may beswapped into the active register set "A" to allow access along with theactive base set of registers ra 0 . . . 23! 565. This configuration ofthe "A" register set is selected upon the acknowledgement of aninterrupt or the execution of an exception trap handling routine. Thisstate of the register set "A" is maintained until expressly returned tothe state shown in FIG. 7A by the execution of an enable interruptsinstruction or execution of a return from trap instruction.

In the preferred embodiment of the present invention as implemented bythe architecture 100, the floating point data path utilizes an extendedprecision register file array 572 as generally shown in FIG. 8. Theregister file array 572 consists of 32 registers, rf 0 . . . 31!, eachhaving a width of 64 bits. The floating point register file 572 may alsobe logically referenced as a "B" set of integer registers rb 0 . . .31!. In the architecture 100, this "B" set of registers is equivalent tothe low-order 32 bits of each of the floating point registers rf 0 . . .31!.

Representing a third data path, a boolean operator register set 574 isprovided, as shown in FIG. 9, to store the logical result of booleancombinatorial operations. This "C" register set 574 consists of 32single bit registers, rc 0 . . . 31!. The operation of the booleanregister set 574 is unique in that the results of boolean operations canbe directed to any instruction selected register of the boolean registerset 574. This is in contrast to utilizing a single processor status wordregister that stores single bit flags for conditions such as equal, notequal, greater than and other simple boolean status values.

Both the floating point register set 572 and the boolean register set574 are complimented by temporary buffers architecturally identical tothe integer temporary buffer 552 shown in FIG. 6B. The essentialdifference is that the width of the temporary buffer registers isdefined to be identical to those of the complimenting register filearray 572, 574; in the preferred implementation, 64 bits and one bit,respectively.

A number of additional special registers are at least logically presentin the register array 472. The registers that are physically present inthe register array 472, as shown in FIG. 7C, include a kernel stackpointer 568, processor state register (PSR) 569, previous processorstate register (PPSR) 570, and an array of eight temporary processorstate registers (tPSR 0 . . . 7!) 571. The remaining special registersare distributed throughout various parts of the architecture 100. Thespecial address and data bus 354 is provided to select and transfer databetween the special registers and the "A" and "B" sets of registers. Aspecial register move instruction is provided to select a register fromeither the "A" or "B" register set, the direction of transfer and tospecify the address identifier of a special register.

The kernel stack pointer register and temporary processor stateregisters differ from the other special registers. The kernel stackpointer may be accessed through execution of a standard register toregister move instruction when in kernel state. The temporary processorstate registers are not directly accessible. Rather, this array ofregisters is used to implement an inheritance mechanism for propagatingthe value of the processor state register for use by out-of-orderexecuting instructions. The initial propagation value is that of theprocessor state register: the value provided by the last retiredinstruction. This initial value is propagated forward through thetemporary processor state registers so that any out-of-order executinginstruction has access to the value in the positionally correspondingtemporary processor state register. The specific nature of aninstruction defines the condition code bits, if any, that theinstruction is dependent on and may change. Where an instruction isunconstrained by dependencies, register or condition code as determinedby the register dependency checker unit 494 and carry dependency checker492, the instruction can be executed out-of-order. Any modification ofthe condition code bits of the processor state register are directed tothe logically corresponding temporary processor state register.Specifically, only those bits that may change are applied to the valuein the temporary processor state register and propagated to all higherorder temporary processor state registers. Consequently, everyout-of-order executed instruction executes from a processor stateregister value modified appropriately by any intervening PSR modifyinginstructions. Retirement of an instruction only transfers thecorresponding temporary processor state registers value to the PSRregister 569.

The remaining special registers are described in Table II.

                  TABLE II    ______________________________________    Special Registers            Special Move    Reg     R/W        Description:    ______________________________________    PC      R          Program Counters: in general, PCs                       maintain the next address of the                       currently executing program                       instruction stream.    IF.sub.-- PC            R/W        IFU Program Counter: the IF.sub.-- PC                       maintains the precise next execution                       address.    PFnPCs  R          Prefetch Program Counters: the MBUF,                       TBUF and EBUF PFnPCs maintain the                       next prefetch instruction addresses                       for the respective prefetch                       instruction streams.    uPC     R/W        Micro-Program Counter: maintains the                       address of the instruction following                       a procedural instruction. This is                       the address of the first instruction                       to be executed upon return from a                       procedural routine.    xPC     R/W        Interrupt/Exception Program Counter:                       holds the return address of an                       interrupt or and exception. The                       return address is the address of the                       IF.sub.-- PC at the time of the trap.    TBR     W          Trap Base Register: base address of                       a vector table used for trap                       handling routine dispatching. Each                       entry is one word long. The trap                       number, provided by Interrupt Logic                       Unit 363, is used as an index into                       the table pointed to by this                       address.    FTB     W          Fast Trap Base Register: base                       address of an immediate trap                       handling routine table. Each table                       entry is 32 words and is used to                       directly implement a trap handling                       routine. The trap number, provided                       by Interrupt Logic Unit 363, times                       32 is used as an offset into the                       table pointed to by this address.    PBR     W          Procedural Base Register: base                       address of a vector table used for                       procedural routine dispatching.                       Each entry is one word long, aligned                       on four word boundaries. The                       procedure number, provided as a                       procedural instruction field, is                       used as an index into the table                       pointed to by this address.    PSR     R/W        Processor State Register: maintains                       the processor status word. Status                       data bits include: carry, overflow,                       zero, negative, processor mode,                       current interrupt level, procedural                       routine being executed, divide by                       0, overflow exception, hardware                       function enables, procedural enable,                       interrupt enable.    PPSR    R/W        Previous Processor State Register:                       loaded from the PSR on successful                       completion of an instruction or when                       an interrupt or trap is taken.    CSR     R/W        Compare State (Boolean) Register:                       the boolean register set accessible                       as a single word.    PCSR    R/W        Previous Compare State Register:                       loaded from the CSR on successful                       completion of an instruction or when                       an interrupt or trap is taken.    ______________________________________

2) Integer Data Path Detail:

The integer data path of the IEU 104, constructed in accordance with thepreferred embodiment of the present invention, is shown in FIG. 10. Forpurposes of clarity, the many control path connections to the integerdata path 580 are not shown. Those connections are defined with respectto FIG. 5.

Input data for the data path 580 is obtained from the alignment units582, 584 and the integer load/store unit 586. Integer immediate datavalues, originally provided as an instruction embedded data field areobtained from the operand unit 470 via a bus 588. The alignment unit 582operates to isolate the integer data value and provide the resultingvalue onto the output bus 590 to a multiplexer 592. A second input tothe multiplexer 592 is the special register address and data bus 354.

Immediate operands obtained from the instruction stream are alsoobtained from the operand unit 470 via the data bus 594. These valuesare again right justified by the alignment unit 584 before provisiononto an output bus 596.

The integer load/store unit 586 communicates bi-directionally via theexternal data bus 598 with the CCU 106. Inbound data to the IEU 104 istransferred by the integer load/store unit 586 onto the input data bus600 to an input latch 602. Data output from the multiplexer 592 andlatch 602 are provided on the multiplexer input buses 604, 606 of amultiplexer 608. Data from the functional unit output bus 482' is alsoreceived by the multiplexer 608. This multiplexer 608, in the preferredembodiments of the architecture 100, provides for two simultaneous datapaths to the output multiplexer buses 610. Further, the transfer of datathrough the multiplexer 608 can be completed within each half cycle ofthe system clock. Since most instructions implemented by thearchitecture 100 utilize a single destination register, a maximum offour instructions can provide data to the temporary buffer 612 duringeach system clock cycle.

Data from the temporary buffer 612 can be transferred to an integerregister file array 614, via temporary register output buses 616 or to aoutput multiplexer 620 via alternate temporary buffer register buses618. Integer register array output buses 622 permit the transfer ofinteger register date to the multiplexer 620. The output buses connectedto the temporary buffer 612 and integer register file array 614 eachpermit five register values to be output simultaneously. That is, twoinstructions referencing a total of up to five source registers can beissued simultaneously. The temporary buffer 612, register file array 614and multiplexer 620 allow outbound register data transfers to occurevery half system clock cycle. Thus, up to four integer and floatingpoint instructions may be issued during each clock cycle.

The multiplexer 620 operates to select outbound register data valuesfrom the register file array 614 or directly from the temporary buffer612. This allows out-of-order executed instructions with dependencies onprior out-of-order executed instructions to be executed by the IEU 104.This facilitates the twin goals of maximizing the execution through-putcapability of the IEU integer data path by the out-of-order execution ofpending instructions while precisely segregating out-of-order dataresults from data results produced by instructions that have beenexecuted and retired. Whenever an interrupt or other exception conditionoccurs that requires the precise state of the machine to be restored,the present invention allows the data values present in the temporarybuffer 612 to be simply cleared. The register file array 614 istherefore left to contain precisely those data values produced only bythe execution of instructions completed and retired prior to theoccurrence of the interrupt or other exception condition.

The up to five register data values selected during each half systemclock cycle operation of the multiplexer 620 are provided via themultiplexer output buses 624 to an integer bypass unit 626. This bypassunit 626 is, in essence, a parallel array of multiplexers that providefor the routing of data presented at any of its inputs to any of itsoutputs. The bypass unit 626 inputs include the special registeraddressed data value or immediate integer value via the output bus 604from the multiplexer 592, the up to five register data values providedon the buses 624, the load operand data from the integer load/store unit586 via the double integer bus 600, the immediate operand value obtainedfrom the alignment unit 584 via its output bus 596, and, finally, abypass data path from the functional unit output bus 482'. This bypassdata path, and the data bus 482', provides for the simultaneous transferof four register values per system clock cycle.

Data is output by the bypass unit 626 onto an integer bypass bus 628that is connected to the floating point data path, to two operand databuses providing for the transfer out of up to five register data valuessimultaneously, and a store data bus 632 that is used to provide data tothe integer load/store unit 586.

The functional unit distribution bus 480 is implemented through theoperation of a router unit 634. Again, the router unit 634 isimplemented by a parallel array of multiplexers that permit fiveregister values received at its inputs to be routed to the functionalunits provided in the integer data path. Specifically, the router unit634 receives the five register data values provided via the buses 630from the bypass unit 626, the current IF₋₋ PC address value via theaddress bus 352 and the control flow offset value determined by the PCcontrol unit 362 and as provided on the lines 378'. The router unit 634may optionally receive, via the data bus 636 an operand data valuesourced from a bypass unit provided within the floating point data path.

The register data values received by the router unit 634 may betransferred onto the special register address and data bus 354 and tothe functional units 640, 642, 644. Specifically, the router unit 634 iscapable of providing up to three register operand values to each of thefunctional units 640, 642, 644 via router output buses 646, 648, 650.Consistent with the general architecture of the architecture 100, up totwo instructions could be simultaneously issued to the functional units640, 642, 644. The preferred embodiment of the present inventionprovides for three dedicated integer functional units, implementingrespectively a programmable shift function and two arithmetic logic unitfunctions.

An ALU0 functional unit 644, ALU1 functional unit 642 and shifterfunctional unit 640 provide respective output register data onto thefunctional unit bus 482'. The output data produced by the ALU0 andshifter functional unit 644, 640 are also provided onto a shared integerfunctional unit bus 650 that is coupled into the floating point datapath. A similar floating point functional unit output value data bus 652is provided from the floating point data path to the functional unitoutput bus 482'.

The ALU0 functional unit 644 is used also in the generation of virtualaddress values in support of both the prefetch operations of the IFU 102and data operations of the integer load/store unit 586. The virtualaddress value calculated by the ALU0 functional unit 644 is providedonto an output bus 654 that connects to both the target address bus 346of the IFU 102 and to the CCU 106 to provide the execution unit physicaladdress (EX PADDR). A latch 656 is provided to store the virtualizingportion of the address produced by the ALU0 functional unit 644. Thisvirtualizing portion of the address is provided onto an output bus 658to the VMU 108.

3) Floating Point Data Path Detail:

Referring now to FIG. 11, the floating point data path 660 is shown.Initial data is again received from a number of sources including theimmediate integer operand bus 588, immediate operand bus 594 and thespecial register address data bus 354. The final source of external datais a floating point load/store unit 662 that is coupled to the CCU 106via the external data bus 598.

The immediate integer operand is received by an alignment unit 664 thatfunctions to right justify the integer data field before submission to amultiplexer 666 via an alignment output data bus 668. The multiplexer666 also receives the special register address data bus 354. Immediateoperands are provided to a second alignment unit 670 for rightjustification before being provided on an output bus 672. Inbound datafrom the floating point load/store unit 662 is received by a latch 674from a load data bus 676. Data from the multiplexer 666, latch 674 and afunctional unit data return bus 482" is received on the inputs of amultiplexer 678. The multiplexer 678 provides for selectable data pathssufficient to allow two register data values to be written to atemporary buffer 680, via the multiplexer output buses 682, each halfcycle of the system clock. The temporary buffer 680 incorporates aregister set logically identical to the temporary buffer 552' as shownin FIG. 6B. The temporary buffer 680 further provides for up to fiveregister data values to be read from the temporary buffer 680 to afloating point register file array 684, via data buses 686, and to anoutput multiplexer 688 via output data buses 690. The multiplexer 688also receives, via data buses 692, up to five register data values fromthe floating point register file array 684 simultaneously. Themultiplexer 688 functions to select up to five register data values forsimultaneous transfer to a bypass unit 694 via data buses 696. Thebypass unit 694 also receives the immediate operand value provided bythe alignment unit 670 via the data bus 672, the output data bus 698from the multiplexer 666, the load data bus 676 and a data bypassextension of the functional unit data return bus 482". The bypass unit694 operates to select up to five simultaneous register operand datavalues for output onto the bypass unit output buses 700, a store databus 702 connected to the floating point load/store unit 662, and thefloating point bypass bus 636 that connects to the router unit 634 ofthe integer data path 580.

A floating point router unit 704 provides for simultaneous selectabledata paths between the bypass unit output buses 700 and the integer datapath bypass bus 628 and functional unit input buses 706, 708, 710coupled to the respective functional units 712, 714, 716. Each of theinput buses 706, 708, 710, in accordance with the preferred embodimentof the architecture 100, permits the simultaneous transfer of up tothree register operand data values to each of the functional unit 712,714, 716. The output buses of these functional units 712, 714, 716 arecoupled to the functional unit data return bus 482" for returning datato the register file input multiplexer 678. The integer data pathfunctional unit output bus 650 may also be provided to connect to thefunctional unit data return bus 482". The architecture 100 does providefor a connection of the functional unit output buses of a multiplierfunctional unit 712 and a floating point ALU 714 to be coupled via thefloating point data path functional unit bus 652 to the functional unitdata return bus 482' of the integer data path 580.

4) Boolean Register Data Path Detail:

The boolean operations data path 720 is shown in FIG. 12. This data path720 is utilized in support of the execution of essentially two types ofinstructions. The first type is an operand comparison instruction wheretwo operands, selected from the integer register sets, floating pointregister sets or provided as immediate operands, are compared bysubtraction in one of the ALU functional units of the integer andfloating point data paths. Comparison is performed by a subtractionoperation by any of the ALU functional units 642, 644, 714, 716 with theresulting sign and zero status bits being provided to a combined inputselector and comparison operator unit 722. This unit 722, in response toinstruction identifying control signals received from the EDecode unit490, selects the output of an ALU functional unit 642, 644, 714, 716 andcombines the sign and zero bits to extract a boolean comparison resultvalue. An output bus 723 allows the results of the comparison operationto be transferred simultaneously to an input multiplexer 726 and abypass unit 742. As in the integer and floating point data paths, thebypass unit 742 is implemented as a parallel array of multiplexersproviding multiple selectable data paths between the inputs of thebypass unit 742 to multiple outputs. The other inputs of the bypass unit742 include a boolean operation result return data bus 724 and twoboolean operands on data buses 744. The bypass unit 742. permits booleanoperands representing up to two simultaneously executing booleaninstructions to be transferred to a boolean operation functional unit746, via operand buses 748. The bypass unit 742 also permits transfer ofup to two single bit boolean operand bits (CF0, CF1) to besimultaneously provided on the control flow result control lines 750,752.

The remainder of the boolean operation data path 720 includes the inputmultiplexer 726 that receives as its inputs, the comparison and theboolean operation result values provided on the comparison result bus723 and a boolean result bus 724. The bus 724 permits up to twosimultaneous boolean result bits to be transferred to the multiplexer726. In addition, up to two comparison result bits may be transferredvia the bus 723 to the multiplexer 726. The multiplexer 726 permits anytwo single bits presented at the multiplexer inputs to be transferredvia the multiplexer output buses 730 to a boolean operation temporarybuffer 728 during each half cycle of the system clock. The temporarybuffer 728 is logically equivalent to the temporary buffer 552', asshown in FIG. 6B, though differing in two significant respects. Thefirst respect is that each register entry in the temporary buffer 728consists of a single bit. The second distinction is that only a singleregister is provided for each of the eight pending instruction slots,since the result of a boolean operation is, by definition, fully definedby a single result bit.

The temporary buffer 728 provides up to four output operand valuessimultaneously. This allows the simultaneous execution of two booleaninstructions, each requiring access to two source registers. The fourboolean register values may be transferred during each half cycle of thesystem clock onto the operand buses 736 to a multiplexer 738 or to aboolean register file array 732 via the boolean operand data buses 734.The boolean register file array 732, as logically depicted in FIG. 9, isa single 32 bit wide data register that permits any separate combinationof up to four single bit locations to be modified with data from thetemporary buffer 728 and read from the boolean register file array 732onto the output buses 740 during each half cycle of the system clock.The multiplexer 738, provides for any two pairs of boolean operandsreceived at its inputs via the buses 736, 740 to be transferred onto theoperand output buses 744 to the bypass unit 742.

The boolean operation functional unit 746 is capable of performing awide range of boolean operations on two source values. In the case ofcomparison instructions, the source values are a pair of operandsobtained from any of the integer and floating point register sets andany immediate operand provided to the IEU 104, and, for a booleaninstruction, any two of boolean register operands. Tables III and IVidentify the logical comparison operations provided by the preferredembodiment of the architecture 100. Table V identifies the directboolean operations provided by the preferred implementation of thearchitecture 100. The instruction condition codes and function codesspecified in the Tables III-V represent a segment of the correspondinginstructions. The instruction also provides an identification of thesource pair of operand registers and the destination boolean registerfor storage of the corresponding boolean operation result.

                  TABLE III    ______________________________________    Integer Comparison                            Instruction    Condition*      Symbol  Condition Code    ______________________________________    rs1 greater than rs2                    >       0000    rs1 greater than                    >=      0001    or equal to rs2    rs1 less than rs2                    <       0010    rs1 less than   >=      0011    or equal to rs2    rs1 unequal to rs2                    |=      0100    rs1 equal to rs2                    ==      0101    reserved                0110    unconditional           1111    ______________________________________     *rs = register source

                  TABLE IV    ______________________________________    Floating Point Comparison                               Instruction    Condition          Symbol  Cond. Code    ______________________________________    rs1 greater than rs2                       >       0000    rs1 greater than or equal to rs2                       >=      0001    rs1 less than rs2  <       0010    rs1 less than or equal to rs2                       >=      0011    rs1 unequal to rs2 |=      0100    rs1 equal to rs2   ==      0101    unordered          ?       1000    unordered or rs1 greater than rs2                       ?>      1001    unordered, rs1 greater than                       ?>=     1010    or equa1 to rs2    unordered or rs1 less than rs2                       ?<      1011    unordered, rs1 less than                       ?<=     1100    or equal to rs2    unordered or rs1 equal to rs2                       ?=      1101    reserved                   1110-1111    ______________________________________

                  TABLE V    ______________________________________    Boolean Operation                           Instruction    Operation*     Symbol  Function Code    ______________________________________    0              Zero    0000    bs1 & bs2      AND     0001    bs1 & ˜bs2                   ANN2    0010    bs1            bs1     0011    ˜bs1 & bs2                   ANN1    0100    bs2            bs2     0101    bs1  bs2       XOR     0110    bs1 .linevert split. bs2                   OR      0111    ˜bs1 and ˜bs2                   NOR     1000    ˜bs1 bs2 XNOR    1001    ˜bs2     NOT2    1010    bs1 .linevert split. ˜bs2                   ORN2    1011    ˜bs1     NOT1    1100    ˜bs1 .linevert split. bs2                   ORN1    1101    ˜bs1 .linevert split. ˜bs2                   NAND    1110    1              ONE     1111    ______________________________________     *bs = boolean source register

B) Load/Store Control Unit:

An exemplary load/store unit 760 is shown in FIG. 13. Althoughseparately shown in the data paths 580, 660, the load/store units 586662 are preferably implemented as a single shared load/store unit 760.The interface from a respective data path 580, 660 is via an address bus762 and load and store data buses 764 (600, 676), 766 (632, 702).

The address utilized by the load/store unit 760 is a physical address asopposed to the virtual address utilized by the IFU 102 and the remainderof the IEU 104. While the IFU 102 operates on virtual addresses, relyingon coordination between the CCU 106 and VMU 108 to produce a physicaladdress, the IEU 104 requires the load/store unit 760 to operatedirectly in a physical address mode. This requirement is necessary toinsure data integrity in the presence of out-of-order executedinstructions that may involve overlapping physical address data load andstore operations and in the presence of out-of-order data returns fromthe CCU 106 to the load/store unit 760. In order to insure dataintegrity, the load/store unit 760 buffers data provided by storeinstructions until the store instruction is retired by the IEU 104.Consequently, store data buffered by the load store unit 760 may beuniquely present only in the load/store unit 760. Load instructionsreferencing the same physical address as executed but not retired storeinstructions are delayed until the store instruction is actuallyretired. At that point the store data may be transferred to the CCU 106by the load/store unit 760 and then immediately loaded back by theexecution of a CCU data load operation.

Specifically, full physical addresses are provided from the VMU 108 ontothe load/store address bus 762. Load addresses are, in general, storedin load address registers 768₀₋₃. Store addresses are latched into storeaddress registers 770₃₋₀. A load/store control unit 774 operates inresponse to control signals received from the instruction issuer unit498 in order to coordinate latching of load and store addresses into theregisters 768₃₋₀, 770₃₋₀. The load/store control unit 774 providescontrol signals on control lines 778 for latching load addresses and oncontrol lines 780 for latching store addresses. Store data is latchedsimultaneous with the latching of store addresses in logicallycorresponding slots of the store data register set 782₃₋₀. A 4×4×32 bitwide address comparator unit 772 is simultaneously provided with each ofthe addresses in the load and store address registers 768₃₋₀, 770₃₋₀.The execution of a full matrix address comparison during each half cycleof the system clock is controlled by the load/store control unit 774 viacontrol lines 776. The existence and logical location of a load addressthat matches a store address is provided via control signals returned tothe load store control unit 774 via control lines 776.

Where a load address is provided from the VMU 108 and there are nopending stores, the load address is bypassed directly from the bus 762to an address selector 786 concurrent with the initiation of a CCU loadoperation. However, where store data is pending, the load address willbe latched in an available load address latch 768₀₋₃. Upon receipt of acontrol signal from the retirement control unit 500, indicating that thecorresponding store data instruction is retiring, the load/store controlunit 774 initiates a CCU data transfer operation by arbitrating, viacontrol lines 784 for access to the CCU 106. When the CCU 106 signalsready, the load/store control unit 774 directs the selector 786 toprovide a CCU physical address onto the CCU PADDR address bus 788. Thisaddress is obtained from the corresponding store register 770₃₋₀ via theaddress bus 790. Data from the corresponding store data register 782₃₋₀is provided onto the CCU data bus 792.

Upon issuance of load instruction by the instruction issuer 498, theload store control unit 774 enables one of the load address latches768₃₋₀ to latch the requested load address. The specific latch 768₀₋₃selected logically corresponds to the position of the load instructionin the relevant instruction set. The instruction issuer 498 provides theload/store control unit 774 with a five bit vector identifying the loadinstruction within either of the two possible pending instruction sets.Where the comparator 772 does not identify a matching store address, theload address is routed via an address bus 794 to the selector 786 foroutput onto the CCU PADDR address bus 788. Provision of the address isperformed in concert with CCU request and ready control signals beingexchanged between the load/store control unit 774 and CCU 106. Anexecution ID value (ExID) is also prepared and issued by the load/storecontrol unit 774 to the CCU 106 in order to identify the load requestwhen the CCU 106 subsequently returns the requested data including ExIDvalue. This ID value consists of a four bit vector utilizing unique bitsto identify the respective load address latch 768₀₋₃ from which thecurrent load request is generated. A fifth bit is utilized to identifythe instruction set that contains the load instruction. The ID value isthus the same as the bit vector provided with the load request from theinstruction issuer unit 498.

On subsequent signal from the CCU 106 to the load/store control unit 774of the availability of prior requested load data, the load/store controlunit 774 enables an alignment unit to receive the data and provide it onthe load data bus 764. An alignment unit 798 operates to right justifythe load data.

Simultaneously with the return of data from the CCU 106, the load/storecontrol unit 774 receives the ExID value from the CCU 106. Theload/store control unit 774, in turn, provides a control signal to theinstruction issuer unit 498 identifying that load data is being providedon the load data bus 764 and, further, returns a bit vector identifyingthe load instruction for which the load data is being returned.

C) IEU Control Path Detail:

Referring again to FIG. 5, the operation of the IEU control path willnow be described in detail with respect to the timing diagram providedin FIG. 14. The timing of the execution of instructions represented inFIG. 14 is exemplary of the operation of the present invention, and notexhaustive of execution timing permutations.

The timing diagram of FIG. 14 shows a sequence of processor system clockcycles, P₀₋₆. Each processor cycle begins with an internal T Cycle, T₀.There are two T cycles per processor cycle in a preferred embodiment ofthe present invention as provided for by the architecture 100.

In processor cycle zero, the IFU 102 and the VMU 108 operate to generatea physical address. The physical address is provided to the CCU 106 andan instruction cache access operation is initiated. Where the requestedinstruction set is present in the instruction cache 132, an instructionset is returned to the IFU 102 at about the mid-point of processor cycleone. The IFU 102 then manages the transfer of the instruction setthrough the prefetch unit 260 and IFIFO 264, whereupon the instructionset is first presented to the IEU 104 for execution.

1) EDecode Unit Detail:

The EDecode unit 490 receives the full instruction set in parallel fordecoding prior to the conclusion of processor cycle one. The EDecodeunit 490, in the preferred architecture 100, is implemented as a purecombinatorial logic block that provides for the direct parallel decodingof all valid instructions that are received via the bus 124. Each typeof instruction recognized by the architecture 100, including thespecification of the instruction, register requirements and resourceneeds are identified in Table VI.

                  TABLE VI    ______________________________________    Instruction/Specifications    Instruction    Control and Operand Information*    ______________________________________    Move Register  Logical/Arithmetic Function Code:    to Register    specifies Add, Subtract,                   Multiply, Shift, etc.                   Destination Register                   Set PSR only                   Source Register 1                   Source Register 2 or Immediate                   constant value                   Register Set A/B select    Move Immediate Destination Register    to Register    Immediate Integer or Floating                   Point constant value                   Register Set A/B select    Load/Store     Operation Function Code: specifies    Register       Load or Store, use immediate                   value, base and immediate                   value, or base and offset                   Source/Destination Register                   Base Register                   Index Register or Immediate                   constant value                   Register Set A/B select    Immediate Call Signed Immediate Displacement    Control Flow   Operation Function Code: specifies                   branch type and triggering                   condition                   Base Register                   Index Register, Immediate constant                   displacement value, or Trap                   Number                   Register Set A/B select    Special Register                   Operation Function Code: specifies    Move           move to/from special/integer                   register                   Special Register Address                   Identifier                   Source/Destination Register                   Register Set A/B select    Convert Integer                   Operation Function Code: specifies    Move           type of floating point to                   integer conversion                   Source/Destination Register                   Register Set A/B select    Boolean Functions                   Boolean Function Code: specifies                   And, Or, etc.                   Destination boolean register                   Source Register 1                   Source Register 2                   Register Set A/B select    Extended Procedure                   Procedure specifier: specifies                   address offset from                   procedural base value                   Operation: value passed to                   procedure routine    Atomic Procedure                   Procedure specifier: specifies                   address value    ______________________________________     *- instruction includes these fields in addition to a field that decodes     to identify the instruction.

The EDecode unit 490 decodes each instruction of an instruction set inparallel. The resulting identification of instructions, instructionfunctions, register references and function requirements are madeavailable on the outputs of the EDecode unit 490. This information isregenerated and latched by the EDecode unit 490 during each halfprocessor cycle until all instructions in the instruction set areretired. Thus, information regarding all eight pending instructions isconstantly maintained at the output of the EDecode unit 490. Thisinformation is presented in the form of eight element bit vectors wherethe bits or sub-fields of each vector logically correspond to thephysical location of the corresponding instruction within the twopending instruction sets. Thus, eight vectors are provided via thecontrol lines 502 to the carry checker 492, where each vector specifieswhether the corresponding instruction affects or is dependant on thecarry bit of the processor status word. Eight vectors are provided viathe control lines 510 to identify the specific nature of eachinstruction and the function unit requirements. Eight vectors areprovided via the control lines 506 specifying the register referencesused by each of the eight pending instructions. These vectors areprovided prior to the end of processor cycle one.

2) Carry Checker Unit Detail:

The carry checker unit 492 operates in parallel with the dependencycheck unit 494 during the data dependency phase of operation shown inFIG. 14. The carry check unit 492 is implemented in the preferredarchitecture 100 as pure combinatorial logic. Thus, during eachiteration of operation by the carry checker unit 492, all eightinstructions are considered with respect to whether they modify thecarry flag of the processor state register. This is necessary in orderto allow the out-of-order execution of instructions that depend on thestate of the carry bit as set by prior instructions. Control signalsprovided on the control lines 504 allow the carry check unit 492 toidentify the specific instructions that are dependant on the executionof prior instructions with respect to the carry flag.

In addition, the carry checker unit 492 maintains a temporary copy ofthe carry bit for each of the eight pending instructions. For thoseinstructions that do not modify the carry bit, the carry checker unit492 propagates the carry bit to the next instruction forward in theorder of the program instruction stream. Thus, an out-of-order executedinstruction that modifies the carry bit can be executed and, further, asubsequent instruction that is dependant on such an out-of-orderexecuted instruction may also be allowed to execute, though subsequentto the instruction that modifies the carry bit. Further, maintenance ofthe carry bit by the carry checker unit 492 facilitates out-of-orderexecution in that any exception occurring prior to the retirement ofthose instructions merely requires the carry checker unit 492 to clearthe internal temporary carry bit register. Consequently, the processorstatus register is unaffected by the execution of out-of-order executedinstructions. The temporary bit carry register maintained by the carrychecker unit 492 is updated upon completion of each out-of-orderexecuted instruction. Upon retirement of out-of-order executedinstructions, the carry bit corresponding to the last retiredinstruction in the program instruction stream is transferred to thecarry bit location of the processor status register.

3) Data Dependency Checker Unit Detail:

The data dependency checker unit 494 receives the eight registerreference identification vectors from the EDecode unit 490 via thecontrol lines 506. Each register reference is indicated by a five bitvalue, suitable for identifying any one of 32 registers at a time, and atwo bit value that identifies the register bank as located within the"A", "B" or boolean register sets. The floating point register set isequivalently identified as the "B" register set. Each instruction mayhave up to three register reference fields: two source register fieldsand one destination. Although some instructions, most notably the moveregister to register instructions, may specify a destination register,an instruction bit field recognized by the EDecode unit 490 may signifythat no actual output data is to be produced. Rather, execution of theinstruction is only for the purpose of determining an alteration of thevalue of the processor status register.

The data dependency checker 494, implemented again as pure combinatoriallogic in the preferred architecture 100, operates to simultaneouslydetermine dependencies between source register references ofinstructions subsequent in the program instruction stream anddestination register references of relatively prior instructions. A bitarray is produced by: the data dependency checker 494 that identifiesnot only which instructions are dependant on others, but also theregisters upon which each dependency arises.

The carry and register data dependencies are identified shortly afterthe beginning of the second processor cycle.

4) Register Rename Unit Detail:

The register rename unit 496 receives the identification of the registerreferences of all eight pending instructions via the control lines 506,and register dependencies via the control lines 508. A matrix of eightelements is also received via the control lines 532 that identify thoseinstructions within the current set of pending instructions that havebeen executed (done). From this information, the register rename unit496 provides an eight element array of control signals to theinstruction issuer unit 498 via the control lines 512. The controlinformation so provided reflects the determination made by the registerrename unit 496 as to which of the currently pending instructions, thathave not already been executed, are now available to be executed giventhe current set of identified data dependencies. The register renameunit 496 receives a selection control signal via the lines 516 thatidentifies up to six instructions that are to be simultaneously issuedfor execution: two integer, two floating point and two boolean.

The register rename unit 496 performs the additional function ofselecting, via control signals provided on the bus 518 to the registerfile array 472, the source registers for access in the execution of theidentified instructions. Destination registers for out-of-order executedinstructions are selected as being in the temporary buffers 612, 680,728 of the corresponding data path. In-order executed instructions areretired on completion with result data being stored through to theregister files 614, 684, 732. The selection of source registers dependson whether the register has been prior selected as a destination and thecorresponding prior instruction has not yet been retired. In such aninstance, the source register is selected from the correspondingtemporary buffer 612, 680, 728. Where the prior instruction has beenretired, then the register of the corresponding register file 614, 684,732 is selected. Consequently, the register rename unit 496 operates toeffectively substitute temporary buffer register references for registerfile register references in the case of out-of-order executedinstructions.

As implemented in the architecture 100, the temporary buffers 612, 680,728 are not duplicate register structures of their correspondingregister file arrays. Rather, a single destination register slot isprovided for each of eight pending instructions. Consequently, thesubstitution of a temporary buffer destination register reference isdetermined by the location of the corresponding instruction within thepending register sets. A subsequent source register reference isidentified by the data dependency checker 494 with respect to theinstruction from which the source dependency occurs. Therefore, adestination slot in the temporary buffer register is readilydeterminable by the register rename unit 496.

5) Instruction Issuer Unit Detail:

The instruction issuer unit 498 determines the set of instructions thatcan be issued, based on the output of the register rename unit 496 andthe function requirements of the instructions as identified by theEDecode unit 490. The instruction issuer unit 498 makes thisdetermination based on the status of each of the functional units478_(0-n) as reported via control lines 514. Thus, the instructionissuer unit 498 begins operation upon receipt of the available set ofinstructions to issue from the register rename unit 496. Given that aregister file access is required for the execution of each instruction,the instruction issuer unit 498 anticipates the availability offunctional unit 478_(0-n) that may be currently executing aninstruction. In order to minimize the delay in identifying theinstructions to be issued to the register rename unit 496, theinstruction issuer unit 498 is implemented in dedicated combinatoriallogic.

Upon identification of the instructions to issue, the register renameunit 496 initiates a register file access that continues to the end ofthe third processor cycle, P₂. At the beginning of processor cycle P₃,the instruction issuer unit 498 initiates operation by one or more ofthe functional units 478_(0-n), such as shown as "Execute 0", to receiveand process source data provided from the register file array 472.

Typically, most instructions processed by the architecture 100 areexecuted through a functional unit in a single processor cycle. However,some instructions require multiple processor cycles to complete, such asshown as "Execute 1", a simultaneously issued instruction. The Executezero and Execute 1 instructions may, for example, be executed by an ALUand floating point multiplier functional units respectively. The ALUfunctional unit, as shown is FIG. 14, produces output data within oneprocessor cycle and, by simple provision of output latching, availablefor use in executing another instruction during the fifth processorcycle, P₄. The floating point multiply functional unit is preferably aninternally pipelined functional unit. Therefore, another additionalfloating point multiply instruction can be issued in the next processorcycle. However, the result of the first instruction will not beavailable for a data dependant number of processor cycles; theinstruction shown in FIG. 14 requires three processor cycles to completeprocessing through the functional unit.

During each processor cycle, the function of the instruction issuer unit498 is repeated. Consequently, the status of the current set of pendinginstructions as well as the availability state of the full set offunctional units 478_(0-n) are reevaluated during each processor cycle.Under optimum conditions, the preferred architecture 100 is thereforecapable of executing up to six instructions per processor cycle.However, a typical instruction mix will result in an overall averageexecution of 1.5 to 2.0 instructions per processor cycle.

A final consideration in the function of the instruction issuer 498 isits participation in the handling of traps conditions and the executionof specific instructions. The occurrence of a trap condition requiresthat the IEU 104 be cleared of all instructions that have not yet beenretired. Such a circumstance may arise in response to an externallyreceived interrupt that is relayed to the IEU 104 via the interruptrequest/acknowledge control line 340, from any of the functional units478_(0-n) in response to an arithmetic fault, or, for example, theEDecode unit 490 upon the decoding of an illegal instruction. On theoccurrence of the trap condition, the instruction issuer unit 498 isresponsible for halting or voiding all unretired instructions currentlypending in the IEU 104. All instructions that cannot be retiredsimultaneously will be voided. This result is essential to maintain thepreciseness of the occurrence of the interrupt with respect to theconventional in-order execution of a program instruction stream. Oncethe IEU 104 is ready to begin execution of the trap handling programroutine, the instruction issuer 498 acknowledges the interrupt via areturn control signal along the control lines 340. Also, in order toavoid the possibility that an exception condition relative to oneinstruction may be recognized based on a processor state bit which wouldhave changed before that instruction would have executed in a classicalpure in-order routine, the instruction issuer 498 is responsible forensuring that all instructions which can alter the PSR (such as specialmove and return from trap) are executed strictly in-order.

Certain instructions that alter program control flow are not identifiedby the IDecode unit 262. Instructions of this type include subroutinereturns, returns from procedural instructions, and returns from traps.The instruction issuer unit 498 provides identifying control signals viathe IEU return control lines 350 to the IFU 102. A corresponding one ofthe special registers 412 is selected to provide the IF₋₋ PC executionaddress that existed at the point in time of the call instruction,occurrence of the trap or encountering of a procedural instruction.

6) Done Control Unit Detail:

The done control unit 540 monitors the functional units 478_(0-n) forthe completion status of their current operations. In the preferredarchitecture 100, the done control unit 540 anticipates the completionof operations by each functional unit sufficient to provide a completionvector, reflecting the status of the execution of each instruction inthe currently pending set of instructions, to the register rename unit496, bypass control unit 520 and retirement control unit 500approximately one half processor cycle prior to the execution completionof an instruction by a functional unit 478_(0-n). This allows theinstruction issuer unit 498, via the register rename unit 496, toconsider the instruction completing functional units as availableresources for the next instruction issuing cycle. The bypass controlunit 520 is allowed to prepare to bypass data output by the functionalunit through the bypass unit 474. Finally, the retirement control unit500 may operate to retire the corresponding instruction simultaneouswith the transfer of data from the functional unit 478_(0-n) to theregister file array 472.

7) Retirement Control Unit Detail:

In addition to the instruction done vector provided from the donecontrol unit 540, the retirement control unit 500 monitors the oldestinstruction set output from the EDecode output 490. As each instructionin instruction stream order is marked done by the done control unit 540,the retirement control unit 500 directs, via control signals provided oncontrol lines 534, the transfer of data from the temporary buffer slotto the corresponding instruction specified register file registerlocation within the register file array 472. The PC Inc/Size controlsignals are provided on the control lines 344 for each one or moreinstruction simultaneously retired. Up to four instructions may beretired per processor cycle. Whenever an entire instruction set has beenretired, an IFIFO read control signal is provided on the control line342 to advance the IFIFO 264.

8) Control Flow Control Unit Detail:

The control flow control unit 528 operates to continuously provide theIFU 102 with information specifying whether any control flowinstructions within the current set of pending instructions have beenresolved and, further, whether the branch result is taken or not taken.The control flow control unit 528 obtains, via control lines 510, anidentification of the control flow branch instructions by the EDecode490. The current set of register dependencies is provided via controllines 536 from the data dependency checker unit 494 to the control flowcontrol unit 528 to allow the control flow control unit 528 to determinewhether the outcome of a branch instruction is constrained bydependencies or is now known. The register references provided via bus518 from the register rename unit 496 are monitored by the control flowControl 528 to identify the boolean register that will define the branchdecision. Thus, the branch decision may be determined even prior to theout-of-order execution of the control flow instruction.

Simultaneous with the execution of a control flow instruction, thebypass unit 472 is directed by the bypass control unit 520 to providethe control flow results onto control lines 530, consisting of thecontrol flow zero and control flow one 1 control lines 750, 752, to thecontrol flow control unit 528. Finally, the control flow control unit528 continuously provides two vectors of eight bits each to the IFU 102via control lines 348. These vectors define whether a branch instructionat the corresponding logical location corresponding to the bits withinthe vectors have been resolved and whether the branch result is taken ornot taken.

In the preferred architecture 100, the control flow control unit 528 isimplemented as pure combinatorial logic operating continuously inresponse to the input control signals to the control unit 528.

9 ) Bypass Control Unit Detail:

The instruction issuer unit 498 operates closely in conjunction with thebypass control unit 520 to control the routing of data between theregister file array 472 and the functional units 478_(0-n). The bypasscontrol unit 520 operates in conjunction with the register file access,output and store phases of operation shown in FIG. 14. During a registerfile access, the bypass control unit 520 may recognize, via controllines 522, an access of a destination register within the register filearray 472 that is in the process of being written during the outputphase of execution of an instruction. In this case, the bypass controlunit 520 directs the selection of data provided on the functional unitoutput bus 482 to be bypassed back to the functional unit distributionbus 480. Control over the bypass unit 520 is provided by the instructionissuer unit 498 via control lines 532.

IV. Virtual Memory Control Unit

An interface definition for the VMU 108 is provided in FIG. 15. The VMU108 consists principally of a VMU control logic unit 800 and a contentaddressable memory (CAM) 802. The general function of the VMU 108 isshown graphically in FIG. 16. There, a representation of a virtualaddress is shown partitioned into a space identifier (sID 31:28!), avirtual page number (VADDR 27:14!), page offset (PADDR 13:4!), and arequest ID (rID 3:0!). The algorithm for generating a physical addressis to use the space ID to select one of 16 registers within a spacetable 842. The contents of the selected space register in combinationwith a virtual page number is used as an address for accessing a tablelook aside buffer (TLB) 844. The 34 bit address operates as a contentaddress tag used to identify a corresponding buffer register within thebuffer 844. On the occurrence of a tag match, an 18 bit wide registervalue is provided as the high order 18 bits of a physical address 846.The page offset and request ID are provided as the low order 14 bits ofthe physical address 846.

Where there is a tag miss in the table look aside buffer 844, a VMU missis signalled. This requires the execution of a VMU fast trap handlingroutine that implements conventional hash algorithm 848 that accesses acomplete page table data structure maintained in the MAU 112. This pagetable 850 contains entries for all memory pages currently in use by thearchitecture 100. The hash algorithm 848 identifies those entries in thepage table 850 necessary to satisfy the current virtual page translationoperation. Those page table entries are loaded from the MAU 112 to thetrap registers of register set "A" and then transferred by specialregister move instructions to the table look aside buffer 844. Uponreturn from the exception handling routine, the instruction giving riseto the VMU miss exception is re-executed by the IEU 104. The virtual tophysical address translation operation should then complete withoutexception.

The VMU control logic 800 provides a dual interface to both the IFU 102and IEU 104. A ready signal is provided on control lines 822 to the IEU104 to signify that the VMU 108 is available for an address translation.In the preferred embodiment, the VMU 108 is always ready to accept IFU120 translation requests. Both the IFU and IEU 102, 104 may poserequests via control line 328, 804. In the preferred architecture 100,the IFU 102 has priority access to the VMU 108. Consequently, only asingle busy control line 820 is provided to the IEU 104.

Both the IFU and IEU 102, 104 provide the space ID and virtual pagenumber fields to the VMU control logic 800 via control lines 326, 808,respectively. In addition, the IEU 104 provides a read/write controlsignal via control signal 806 to define whether the address is to beused for a load or store operation as necessary to modify memory accessprotection attributes of the virtual memory referenced. The space ID andvirtual page fields of the virtual address are passed to the CAM unit802 to perform the actual translation operation. The page offset andExID fields are eventually provided by the IEU 104 directly to the CCU106. The physical page and request ID fields are provided on the addresslines 836 to the CAM unit 802. The occurrence of a table look asidebuffer match is signalled via the hit line and control output lines 830to the VMU control logic unit 800. The resulting physical address, 18bits in length, is provided on the address output lines 824.

The VMU control logic unit 800 generates the virtual memory miss andvirtual memory exception control signals on lines 344, 332 in responseto the hit and control output control signals on lines 830. A virtualmemory translation miss is defined as failure to match a page tableidentifier in the table look aside buffer 844. All other translationerrors are reported as virtual memory exceptions.

Finally, the data tables within the CAM unit 802 may be modified throughthe execution of special register to register move instructions by theIEU 104. Read/write, register select, reset., load and clear controlsignals are provided by the IEU 104 via control lines 810, 812, 814,816, 818. Data to be written to the CAM unit registers is received bythe VMU control logic unit 800 via the address bus 808 coupled to thespecial address data bus 354 from the IEU 104. This data is transferredvia bus 836 to the CAM unit 802 simultaneous with control signals 828that control the initialization, register selection, and read or writecontrol signal. Consequently, the data registers within the CAM unit 802may be readily written as required during the dynamic operation of thearchitecture 100 including read out for storage as required for thehandling of context switches defined by a higher level operating system.

V. Cache Control Unit

The control on data interface for the CCU 106 is shown in FIG. 17.Again, separate interfaces are provided for the IFU 102 and IEU 104.Further, logically separate interfaces are provided by the CCU 106 tothe MCU 110 with respect to instruction and data transfers.

The IFU interface consists of the physical page address provided onaddress lines 324, the VMU converted page address as provided on theaddress lines 824, and request IDs as transferred separately on controllines 294, 296. A unidirectional data transfer bus 114 is provided totransfer an entire instruction set in parallel to the IFU 102. Finally,the read/busy and ready control signals are provided to the CCU 106 viacontrol lines 298, 300, 302.

Similarly, a complete physical address is provided by the IEU 102 viathe physical address bus 788. The request ExIDs are separately providedfrom and to the load/store unit of the IEU 104 via control lines 796. An80 bit wide bidirectional data bus is provided by the CCU 106 to the IEU104. However, in the present preferred implementation of thearchitecture 100, only the lower 64 bits are utilized by the IEU 104.The availability and support within the CCU 106 of a full 80 bit datatransfer bus is provided to support subsequent implementations of thearchitecture 100 that support, through modifications of the floatingpoint data path 660, floating point operation in accordance with IEEEstandard 754.

The IEU control interface, established via request, busy, ready,read/write and with control signals 784 is substantially the same as thecorresponding control signals utilized by the IFU 102. The exceptionbeing the provision of a read/write control signal to differentiatebetween load and store operations. The width control signals specify thenumber of bytes being transferred during each CCU 106 access by the IEU104; in contrast every access of the instruction cache 132 is a fixed128 bit wide data fetch operation.

The CCU 106 implements a substantially conventional cache controllerfunction with respect to the separate instruction and data caches 132,134. In the preferred architecture 100, the instruction cache 132 is ahigh speed memory providing for the storage of 256 128 bit wideinstruction sets. The data cache 134 provides for the storage of 1024 32bit wide words of data. Instruction and data requests that cannot beimmediately satisfied from the contents of the instruction and datacaches 132, 134 are passed on to the MCU 110. For instruction cachemisses, the 28 bit wide physical address is provided to the MCU 110 viathe address bus 860. The request ID and additional control signals forcoordinating the operation of the CCU 106 and MCU 110 are provided oncontrol lines 862. Once the MCU 110 has coordinated the necessary readaccess of the MAU 112, two consecutive 64 bit wide data transfers areperformed directly from the MAU 112 through to the instruction cache132. Two transfers are required given that the data bus 136 is, in thepreferred architecture 100, a 64 bit wide bus. As the requested data isreturned through the MCU 110 the request ID maintained during thependency of the request operation is also returned to the CCU 106 viathe control lines 862.

Data transfer operations between the data cache 134 and MCU 110 aresubstantially the same as instruction cache operations. Since data loadand store operations may reference a single byte, a full 32 bit widephysical address is provided to the MCU 110 via the address bus 864.Interface control signals and the request ExID are transferred viacontrol lines 866. Bidirectional 64 bit wide data transfers are providedvia the data cache bus 138.

VI. Summary/Conclusion

Thus, a high-performance RISC based microprocessor architecture has beendisclosed. The architecture efficiently implements out-of-orderexecution of instructions, separate main and target instruction streamprefetch instruction transfer paths, and a procedural instructionrecognition and dedicated prefetch path. The optimized instructionexecution unit provides multiple optimized data processing pathssupporting integer, floating point and boolean operations andincorporates respective temporary register files facilitatingout-of-order execution and instruction cancellation while maintaining areadily established precise state-of-the-machine status.

It is therefore to be understood that while the foregoing disclosuredescribes the preferred embodiment of the present invention, othervariations and modifications may be readily made by those of averageskill within the scope of the present invention.

What is claimed is:
 1. A superscalar microprocessor for executinginstructions obtained from an instruction store, said microprocessorcomprising:a fetch circuit to fetch a plurality of instructions fromsaid instruction store, the plurality of instructions being in programorder; a first in first out (FIFO) buffer to buffer said plurality ofinstructions from said fetch circuit; a dispatch circuit to concurrentlydecode and concurrently dispatch more than one of said plurality ofinstructions buffered by said FIFO buffer; and an execution unitcomprising:a plurality of functional units, each of said plurality offunctional units executing one of said plurality of instructionsdispatched by said dispatch circuit out of the program order, and aregister file comprising temporary registers for temporarily storingout-of-order execution results from said plurality of functional unitsand a register array for storing results from said temporary registers;a plurality of data routing paths, and wherein said register filecommunicates with said plurality of functional units via said pluralityof data routing paths for concurrently providing data to more than oneof said plurality of functional units and thereby enabling concurrentexecution of more than one of said plurality instructions by saidplurality of functional units.
 2. The microprocessor of claim 1 furthercomprising:retirement circuitry for causing a plurality of saidout-of-order executed instructions to complete in program order; andwherein said retirement circuitry causes data values to be transferredfrom said temporary registers to said register array.
 3. Themicroprocessor of claim 2 wherein said retirement circuitry is capableof retiring up to four instructions in a processor cycle.
 4. Themicroprocessor of claim 1 wherein said FIFO buffer is capable ofproviding four or more instructions to said dispatch circuit in aprocessor cycle.
 5. The microprocessor of claim 1 wherein said dispatchcircuit is capable of dispatching up to four instructions to saidexecution unit in a processor cycle.
 6. The microprocessor of claim 1wherein said FIFO buffer includes first and second registers; andwhereineach of said first and said second registers concurrentlyprovides one or more instructions to said dispatch circuitry.
 7. Themicroprocessor of claim 1 wherein said FIFO buffer includes first andsecond registers; and whereineach of said first and said secondregisters concurrently provides instruction sets of four instructions tosaid dispatch circuitry.
 8. The microprocessor of claim 1 wherein saiddispatch circuit additionally includes circuitry for issuing saidinstructions out of program order to said execution unit subject to theavailability of said plurality of functional units.
 9. Themicroprocessor of claim 1 wherein said instruction store is coupled toan external cache.
 10. The microprocessor of claim 1 wherein saiddispatch circuit concurrently dispatches said instructions by providinga plurality of said buffered instructions to said execution unit in aprocessor cycle.
 11. A superscalar microprocessor for executinginstructions obtained from an instruction store, said superscalarmicroprocessor comprising:a fetch circuit to fetch a plurality ofinstructions from said instruction store, the plurality of instructionsbeing in program order; an instruction buffer for buffering saidplurality of said instructions; a branch decoder responsive to saidfirst instruction buffer; a first in first out (FIFO) buffer forbuffering said plurality of said instructions from said branch decoder;a dispatch circuit to concurrently decode and concurrently dispatch morethan one of said plurality of instructions buffered by said FIFO buffer;and an execution unit comprising:a plurality of functional units, eachof said plurality of functional units executing one of said plurality ofinstructions dispatched by said dispatch circuit out of the programorder, and a register file comprising temporary registers to temporarilystore out-of-order execution results from said plurality of functionalunits and a register array to store results from said temporaryregisters, a plurality of data routing paths, and wherein said registerfile communicates with said plurality of functional units via saidplurality of data routing paths to supply data to more than one of saidfunctional units and thereby enabling concurrent execution of more thanone of said plurality instructions by said plurality of functionalunits.
 12. The superscalar microprocessor of claim 11 furthercomprising:retirement circuitry for causing a plurality of saidout-of-order executed instructions to complete in program order; andwherein said retirement circuitry causes data values to be transferredfrom said temporary registers to said register array.
 13. Thesuperscalar microprocessor of claim 12 wherein said retirement circuitryis capable of retiring up to four instructions in a processor cycle. 14.The superscalar microprocessor of claim 11 wherein said FIFO buffer iscapable of providing four or more instructions to said dispatch circuitin a processor cycle.
 15. The superscalar microprocessor of claim 11wherein said dispatch circuit is capable of dispatching up to fourinstructions to said execution unit in a processor cycle.
 16. Thesuperscalar microprocessor of claim 11 wherein said dispatch circuitadditionally includes circuitry for issuing said instructions out ofprogram order to said execution unit subject to the availability of saidplurality of functional units.
 17. The superscalar microprocessor ofclaim 11 wherein said instruction store is coupled to an external cachethat stores instructions to be executed by the microprocessor.
 18. Thesuperscalar microprocessor of claim 11 wherein said dispatch circuitconcurrently dispatches said instructions by providing a plurality ofsaid buffered instructions to said execution unit in a processor cycle.19. A superscalar microprocessor for executing instructions obtainedfrom an instruction store, said superscalar microprocessor comprising:afetch circuit to fetch a plurality of instructions from said instructionstore, the plurality of instructions being in program order; aninstruction buffer for buffering said plurality of said instructions; abranch decoder responsive to said first instruction buffer; a first infirst out (FIFO) buffer for buffering said plurality of saidinstructions; a dispatch circuit to concurrently decode and concurrentlydispatch more than one of said plurality of instructions buffered bysaid FIFO buffer; and an execution unit comprising:a plurality offunctional units, each of said plurality of functional units executingone of said plurality of instructions dispatched by said dispatchcircuit out of the program order, and a register file comprisingtemporary registers to temporarily store out-of-order execution resultsfrom said plurality of functional units and a register array to storeresults from said temporary registers, a plurality of data routingpaths, and wherein said register file communicates with said pluralityof functional units via said plurality of data routing paths to supplydata to more than one of said functional units and thereby enablingconcurrent execution of more than one of said plurality instructions bysaid plurality of functional units.
 20. The superscalar microprocessorof claim 19 further comprising:retirement circuitry for causing aplurality of said out-of-order executed instructions to complete inprogram order; and wherein said retirement circuitry causes data valuesto be transferred from said temporary registers to said register array.21. The superscalar microprocessor of claim 20 wherein said retirementcircuitry is capable of retiring up to four instructions in a processorcycle.
 22. The superscalar microprocessor of claim 19 wherein said FIFObuffer is capable of providing four or more instructions to saiddispatch circuit in a processor cycle.
 23. The superscalarmicroprocessor of claim 19 wherein said dispatch circuit is capable ofdispatching up to four instructions to said execution unit in aprocessor cycle.
 24. The superscalar microprocessor of claim 19 whereinsaid dispatch circuit additionally includes circuitry for issuing saidinstructions out of program order to said execution unit subject to theavailability of said plurality of functional units.
 25. The superscalarmicroprocessor of claim 19 wherein said instruction store is coupled toan external cache that stores instructions to be executed by themicroprocessor.
 26. The superscalar microprocessor of claim 19 whereinsaid dispatch circuit concurrently dispatches said instructions byproviding a plurality of said buffered instructions to said executionunit in a processor cycle.
 27. The superscalar microprocessor of claim19 wherein said FIFO buffer buffers said plurality of said instructionsfrom said first instruction buffer.